= 80 ) {
$tips[] = self::create_success_tip( $overall_score );
}
return $tips;
}
/**
* Generate Summary & Answer Optimization tips.
*/
private static function generate_summary_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Summary & Answer Optimization', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'manual_summary':
$tips[] = array(
'id' => 'ultimate_manual_summary',
'severity' => $is_passed ? 'success' : 'critical',
'priority' => 1,
'score_impact' => 15,
'message' => __( 'Add a manual summary (not auto-generated)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Critical for AI answer extraction. Worth up to 15% of your total score.', 'ai-answer-toolkit' ),
'ai_why' => __( 'A manual summary is a short, hand-written description of your content that you create yourself (not auto-generated by the plugin). Write 2-4 sentences in the "AEO Summary" editor above that directly answer the main question or explain what this page is about. AI engines like ChatGPT, Google AI, and voice assistants prefer manual summaries because they are more accurate and trustworthy than auto-generated text. This is the single most important factor for getting your content featured in AI-powered search results.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => $is_passed ? '' : 'summary_editor',
);
break;
case 'summary_length':
$current_length = isset( $check['value'] ) ? $check['value'] : 0;
$tips[] = array(
'id' => 'ultimate_summary_length',
'severity' => $is_passed ? 'success' : 'warning',
'priority' => 5,
'score_impact' => 10,
'message' => sprintf( __( 'Optimize summary length (currently %d chars, target: 300-500)', 'ai-answer-toolkit' ), $current_length ),
'impact_text' => __( 'Optimal length ensures complete context without dilution.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Your summary should be between 300-500 characters long (about 2-4 sentences). This is the sweet spot for AI engines - long enough to provide complete context and answer the question fully, but short enough to be clear and focused. Summaries that are too short lack detail, while summaries that are too long become unfocused. Check the character counter below the summary editor to see your current length.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => $is_passed ? '' : 'summary_editor',
);
break;
case 'direct_answer':
$tips[] = array(
'id' => 'ultimate_direct_answer',
'severity' => $is_passed ? 'success' : 'warning',
'priority' => 3,
'score_impact' => 12,
'message' => __( 'Start summary with a direct answer in first 1-2 sentences', 'ai-answer-toolkit' ),
'impact_text' => __( 'Essential for voice assistants and zero-click results.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Begin your summary with a clear, direct answer to the main question in the first 1-2 sentences. For example, if your page is about "How to bake bread", start with "To bake bread, you need flour, water, yeast, and salt. Mix the ingredients, knead the dough, let it rise, then bake at 375°F for 30 minutes." Voice assistants like Alexa and Siri, as well as AI chatbots, will read this opening sentence as the answer. Avoid starting with introductions like "In this article" or "Welcome to our guide".', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => $is_passed ? '' : 'summary_editor',
);
break;
case 'fluff_free':
$fluff_percent = isset( $check['value'] ) ? $check['value'] : 'high';
$tips[] = array(
'id' => 'ultimate_fluff_free',
'severity' => $is_passed ? 'success' : 'info',
'priority' => 10,
'score_impact' => 8,
'message' => sprintf( __( 'Remove fluff words from summary (fluff density: %s)', 'ai-answer-toolkit' ), $fluff_percent ),
'impact_text' => __( 'Information density improves AI extraction accuracy.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Fluff words are phrases that don\'t add useful information, such as "welcome to our site", "in this article we will discuss", "let\'s dive into", "without further ado", or "stay tuned". Remove these phrases from your summary and replace them with actual facts and answers. Every sentence should tell the reader something valuable. AI engines ignore fluff and prioritize information-dense content that gets straight to the point.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => $is_passed ? '' : 'summary_editor',
);
break;
case 'key_entities':
$tips[] = array(
'id' => 'ultimate_key_entities',
'severity' => $is_passed ? 'success' : 'info',
'priority' => 12,
'score_impact' => 7,
'message' => __( 'Include key entities (brand, topic, product, service) in summary', 'ai-answer-toolkit' ),
'impact_text' => __( 'Entity recognition is core to AI understanding.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Key entities are the specific names, brands, products, services, or topics that your content is about. For example, if you\'re writing about "iPhone 15 Pro", mention "iPhone 15 Pro" and "Apple" by name in your summary. If you\'re writing about "plumbing services in Chicago", mention "plumbing" and "Chicago" explicitly. AI engines identify these entities to understand your content\'s subject matter and match it to relevant searches. Avoid vague pronouns like "it", "this", or "our product" - use the actual names.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => $is_passed ? '' : 'summary_editor',
);
break;
case 'clean_summary':
$tips[] = array(
'id' => 'ultimate_clean_summary',
'severity' => $is_passed ? 'success' : 'warning',
'priority' => 4,
'score_impact' => 10,
'message' => __( 'Remove shortcodes, HTML tags, and promotional language from summary', 'ai-answer-toolkit' ),
'impact_text' => __( 'Clean text ensures proper AI parsing.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Your summary should contain only plain text - no WordPress shortcodes like [button], no HTML tags like
or , and no promotional phrases like "Buy Now!", "Limited Time Offer!", "Click Here!", or "Best Deal Ever!". AI engines cannot properly read shortcodes or HTML, and they distrust overly promotional language. Write your summary as if you\'re explaining the topic to a friend - clear, factual, and helpful without any sales pitch.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => $is_passed ? '' : 'summary_editor',
);
break;
case 'ai_extractable':
$tips[] = array(
'id' => 'ultimate_ai_extractable',
'severity' => $is_passed ? 'success' : 'info',
'priority' => 8,
'score_impact' => 9,
'message' => __( 'Optimize summary for zero-click & AI answer extraction', 'ai-answer-toolkit' ),
'impact_text' => __( 'Maximizes visibility in AI-powered search results.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Your summary should be written so it can stand alone as a complete answer without needing the rest of your page. This means someone reading only your summary should fully understand the answer to their question. AI engines like ChatGPT, Google AI Overview, and voice assistants extract summaries to display as "zero-click answers" - answers shown directly in search results without the user clicking through to your site. Make your summary self-contained with all key facts, numbers, and steps included. Think of it as a mini version of your full content that answers the core question completely.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => $is_passed ? '' : 'summary_editor',
);
break;
}
}
return $tips;
}
/**
* Generate Question & Intent Coverage tips.
*/
private static function generate_question_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Question & Intent Coverage', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'question_headings':
$tips[] = array(
'id' => 'ultimate_question_headings',
'severity' => $severity,
'priority' => 15,
'score_impact' => 15,
'message' => __( 'Add question-based headings (What, How, Why, When, Where, Which)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Question headings are the #1 signal for AI answer extraction.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI systems map user queries to question headings. Use natural language questions that match how people search: "What is X?", "How does Y work?", "Why should I Z?".', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'qa_structure':
$tips[] = array(
'id' => 'ultimate_qa_structure',
'severity' => $severity,
'priority' => 16,
'score_impact' => 12,
'message' => __( 'Implement one-question → one-answer structure', 'ai-answer-toolkit' ),
'impact_text' => __( 'Clear Q&A pairs improve AI comprehension.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Each question heading should be followed by a focused answer paragraph. This structure mirrors how AI chatbots present information and makes your content easy to extract.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'answers_placement':
$tips[] = array(
'id' => 'ultimate_answers_placement',
'severity' => $severity,
'priority' => 18,
'score_impact' => 10,
'message' => __( 'Place answers immediately after question headings', 'ai-answer-toolkit' ),
'impact_text' => __( 'Proximity is key for AI question-answer matching.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI models look for the paragraph immediately following a question heading. Don\'t insert images, ads, or other content between the question and answer.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'followup_queries':
$tips[] = array(
'id' => 'ultimate_followup',
'severity' => $severity,
'priority' => 20,
'score_impact' => 8,
'message' => __( 'Add follow-up & conversational questions', 'ai-answer-toolkit' ),
'impact_text' => __( 'Supports multi-turn AI conversations.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI chatbots engage in multi-turn conversations. Include related questions like "What about...?", "How does this compare to...?" to capture follow-up queries.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'longtail_coverage':
$tips[] = array(
'id' => 'ultimate_longtail',
'severity' => $severity,
'priority' => 22,
'score_impact' => 9,
'message' => __( 'Add long-tail and semantic question variations', 'ai-answer-toolkit' ),
'impact_text' => __( 'Captures diverse user intents and query patterns.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Include 3+ questions covering different angles: basic definitions, how-to guides, comparisons, troubleshooting. This increases your chances of matching varied user queries.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'search_journey':
$tips[] = array(
'id' => 'ultimate_search_journey',
'severity' => $severity,
'priority' => 24,
'score_impact' => 7,
'message' => __( 'Map search journey from informational to transactional', 'ai-answer-toolkit' ),
'impact_text' => __( 'Guides users through the decision-making process.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Start with "What is..." questions (awareness), progress to "How to..." (consideration), and end with "Best..." or "Where to buy..." (decision). AI systems recognize this funnel structure.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'answer_ownership':
$tips[] = array(
'id' => 'ultimate_ownership',
'severity' => $severity,
'priority' => 26,
'score_impact' => 6,
'message' => __( 'Ensure clear answer ownership (avoid cannibalization)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Prevents internal competition for AI answers.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Each question should have one definitive answer on your site. Avoid creating multiple pages targeting the same question, which confuses AI systems about which answer to cite.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
}
}
return $tips;
}
/**
* Generate Content Architecture & Formatting tips.
*/
private static function generate_architecture_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Content Architecture & Formatting', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'single_h1':
$tips[] = array(
'id' => 'ultimate_single_h1',
'severity' => $severity,
'priority' => 30,
'score_impact' => 8,
'message' => __( 'Use a single H1 tag for main entity/topic', 'ai-answer-toolkit' ),
'impact_text' => __( 'Multiple H1s confuse AI about page topic.', 'ai-answer-toolkit' ),
'ai_why' => __( 'The H1 tells AI systems what your page is primarily about. Multiple H1s dilute topical authority and create ambiguity about the main subject.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'heading_hierarchy':
$tips[] = array(
'id' => 'ultimate_hierarchy',
'severity' => $severity,
'priority' => 32,
'score_impact' => 7,
'message' => __( 'Fix heading hierarchy (H2→H3→H4, no skipped levels)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Proper hierarchy helps AI understand content structure.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI models use heading levels to build a content outline. Skipping from H2 to H4 breaks the logical structure and makes it harder for AI to parse relationships between sections.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'above_fold':
$tips[] = array(
'id' => 'ultimate_above_fold',
'severity' => $severity,
'priority' => 28,
'score_impact' => 9,
'message' => __( 'Place direct answers above the fold', 'ai-answer-toolkit' ),
'impact_text' => __( 'First paragraph is critical for AI extraction.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI crawlers prioritize content that appears early in the page. Your opening paragraph should contain a complete, standalone answer to the main query.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'tldr_present':
$tips[] = array(
'id' => 'ultimate_tldr',
'severity' => $severity,
'priority' => 34,
'score_impact' => 6,
'message' => __( 'Add TL;DR or quick-answer blocks', 'ai-answer-toolkit' ),
'impact_text' => __( 'Summary blocks are prime targets for AI extraction.', 'ai-answer-toolkit' ),
'ai_why' => __( 'TL;DR sections signal to AI that this is a condensed, authoritative answer. Use headings like "Quick Answer", "In Short", or "TL;DR" to mark these sections.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'formatting':
$tips[] = array(
'id' => 'ultimate_formatting',
'severity' => $severity,
'priority' => 36,
'score_impact' => 8,
'message' => __( 'Use short paragraphs, bullet points, and tables', 'ai-answer-toolkit' ),
'impact_text' => __( 'Structured formatting improves AI parsing.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Lists and tables are easier for AI to extract and present. Break dense paragraphs into bullets. Use tables for comparisons, specifications, or step-by-step processes.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'section_coverage':
$tips[] = array(
'id' => 'ultimate_sections',
'severity' => $severity,
'priority' => 38,
'score_impact' => 7,
'message' => __( 'Include definition, process, benefits, and conclusion sections', 'ai-answer-toolkit' ),
'impact_text' => __( 'Comprehensive coverage signals content depth to AI.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI models favor comprehensive content. Include: (1) Definition/Overview, (2) How it works/Process, (3) Benefits/Advantages, (4) Conclusion/Summary. This structure matches user search intent progression.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'modular_blocks':
$tips[] = array(
'id' => 'ultimate_modular',
'severity' => $severity,
'priority' => 40,
'score_impact' => 5,
'message' => __( 'Create modular content blocks reusable by AI', 'ai-answer-toolkit' ),
'impact_text' => __( 'Self-contained sections are easier for AI to extract and cite.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Each section should be understandable independently. AI systems extract individual blocks, not entire pages. Make each section complete with context, so it makes sense when quoted alone.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
}
}
return $tips;
}
/**
* Generate Structured Data & Schema tips.
*/
private static function generate_schema_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Structured Data & Schema', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'article_schema':
$tips[] = array(
'id' => 'ultimate_article_schema',
'severity' => $severity,
'priority' => 42,
'score_impact' => 12,
'message' => __( 'Add Article or BlogPosting schema markup', 'ai-answer-toolkit' ),
'impact_text' => __( 'Essential for AI content understanding.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Article schema tells AI systems this is editorial content with author, publish date, and headline. This is the foundation for all other schema types.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'faq_schema':
$tips[] = array(
'id' => 'ultimate_faq_schema',
'severity' => $severity,
'priority' => 44,
'score_impact' => 10,
'message' => __( 'Add FAQPage schema for question-answer content', 'ai-answer-toolkit' ),
'impact_text' => __( 'Directly feeds AI answer engines and voice assistants.', 'ai-answer-toolkit' ),
'ai_why' => __( 'FAQPage schema explicitly marks questions and answers for AI extraction. This is the most direct way to get your content into AI-powered answer boxes and voice responses.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'howto_schema':
$tips[] = array(
'id' => 'ultimate_howto_schema',
'severity' => $severity,
'priority' => 46,
'score_impact' => 8,
'message' => __( 'Add HowTo or QAPage schema for instructional content', 'ai-answer-toolkit' ),
'impact_text' => __( 'Optimizes step-by-step content for AI extraction.', 'ai-answer-toolkit' ),
'ai_why' => __( 'HowTo schema structures procedural content with steps, tools, and time estimates. AI systems use this to generate rich, actionable answers for "how to" queries.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'type_schema':
$tips[] = array(
'id' => 'ultimate_type_schema',
'severity' => $severity,
'priority' => 48,
'score_impact' => 7,
'message' => __( 'Add Product, Review, or Service schema when relevant', 'ai-answer-toolkit' ),
'impact_text' => __( 'Enables rich AI results for commercial content.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Product/Service schema provides pricing, ratings, availability - key data for AI shopping assistants and comparison engines. Essential for transactional queries.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'org_schema':
$tips[] = array(
'id' => 'ultimate_org_schema',
'severity' => $severity,
'priority' => 50,
'score_impact' => 6,
'message' => __( 'Add Organization and Person schema', 'ai-answer-toolkit' ),
'impact_text' => __( 'Establishes entity authority and authorship.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Organization schema defines your brand entity. Person schema establishes author credentials. Both contribute to E-E-A-T signals that AI systems use to assess content trustworthiness.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'breadcrumb_schema':
$tips[] = array(
'id' => 'ultimate_breadcrumb',
'severity' => $severity,
'priority' => 52,
'score_impact' => 5,
'message' => __( 'Enable Breadcrumb schema', 'ai-answer-toolkit' ),
'impact_text' => __( 'Helps AI understand site hierarchy and context.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Breadcrumb schema shows where this page fits in your site structure. AI uses this to understand topical relationships and determine if your site has comprehensive coverage of a subject.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'speakable_schema':
$tips[] = array(
'id' => 'ultimate_speakable',
'severity' => $severity,
'priority' => 54,
'score_impact' => 4,
'message' => __( 'Add Speakable schema for voice readiness', 'ai-answer-toolkit' ),
'impact_text' => __( 'Optimizes content for voice assistants.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Speakable schema marks sections suitable for text-to-speech. Voice assistants use this to select which parts of your content to read aloud in voice search results.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'schema_valid':
$tips[] = array(
'id' => 'ultimate_schema_valid',
'severity' => $severity,
'priority' => 45,
'score_impact' => 8,
'message' => __( 'Fix schema validation errors', 'ai-answer-toolkit' ),
'impact_text' => __( 'Invalid schema is ignored by AI systems.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Schema errors prevent AI from using your structured data. Use Google\'s Rich Results Test or Schema Validator to identify and fix nesting errors, missing required fields, or invalid values.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
case 'schema_quality':
$tips[] = array(
'id' => 'ultimate_schema_quality',
'severity' => $severity,
'priority' => 56,
'score_impact' => 5,
'message' => __( 'Improve schema quality for AI-friendliness', 'ai-answer-toolkit' ),
'impact_text' => __( 'High-quality schema increases AI extraction confidence.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Beyond validation, schema quality matters. Use specific values over generic ones, include optional but relevant fields, and ensure schema matches visible content. AI systems score schema completeness and accuracy.', 'ai-answer-toolkit' ),
'category' => $category,
'action_target' => '',
);
break;
}
}
return $tips;
}
/**
* Generate Semantic & NLP Optimization tips (Phase 2).
*/
private static function generate_semantic_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Semantic & NLP Optimization', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'entity_rich':
$tips[] = array(
'id' => 'semantic_entity_rich',
'severity' => $severity,
'priority' => 60,
'score_impact' => 3,
'message' => __( 'Add more specific entities (names, places, products)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Helps AI understand key topics and relationships.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI systems identify and extract entities (people, organizations, locations, products) to understand content context. Rich entity coverage improves semantic understanding and answer relevance.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'natural_language':
$tips[] = array(
'id' => 'semantic_natural_language',
'severity' => $severity,
'priority' => 61,
'score_impact' => 3,
'message' => __( 'Use more conversational, natural language patterns', 'ai-answer-toolkit' ),
'impact_text' => __( 'Matches how users ask questions to AI.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Conversational language (you, we, how, why) aligns with natural queries. AI systems trained on human dialogue prefer content that mirrors how people actually speak and search.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'synonym_coverage':
$tips[] = array(
'id' => 'semantic_synonyms',
'severity' => $severity,
'priority' => 62,
'score_impact' => 3,
'message' => __( 'Expand content with synonyms and related terms', 'ai-answer-toolkit' ),
'impact_text' => __( 'Increases semantic coverage and query matching.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Using varied terminology (synonyms, related concepts) helps AI match diverse user queries. Semantic search understands meaning beyond exact keywords.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'contextual_relevance':
$tips[] = array(
'id' => 'semantic_context',
'severity' => $severity,
'priority' => 58,
'score_impact' => 4,
'message' => __( 'Improve topic consistency throughout content', 'ai-answer-toolkit' ),
'impact_text' => __( 'Strengthens topical authority signals.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Consistent topic coverage signals expertise. AI systems analyze how well content stays on-topic and reinforces main themes throughout the article.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'semantic_html':
$tips[] = array(
'id' => 'semantic_html_tags',
'severity' => $severity,
'priority' => 63,
'score_impact' => 2,
'message' => __( 'Use semantic HTML tags (strong, em, mark)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Highlights important concepts for AI.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Semantic HTML tags signal emphasis and importance. AI uses these to identify key concepts and prioritize information extraction.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'topical_depth':
$tips[] = array(
'id' => 'semantic_depth',
'severity' => $severity,
'priority' => 57,
'score_impact' => 5,
'message' => __( 'Expand content for comprehensive topic coverage (800+ words)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Demonstrates expertise and authority.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Comprehensive content covering multiple facets of a topic signals expertise. AI systems favor in-depth resources that answer follow-up questions.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'cooccurrence':
$tips[] = array(
'id' => 'semantic_cooccurrence',
'severity' => $severity,
'priority' => 64,
'score_impact' => 2,
'message' => __( 'Group related concepts together in paragraphs', 'ai-answer-toolkit' ),
'impact_text' => __( 'Helps AI understand concept relationships.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Co-occurrence patterns (related terms appearing together) help AI understand semantic relationships and build knowledge graphs from your content.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'natural_density':
$tips[] = array(
'id' => 'semantic_density',
'severity' => $severity,
'priority' => 59,
'score_impact' => 4,
'message' => __( 'Reduce keyword repetition for natural density', 'ai-answer-toolkit' ),
'impact_text' => __( 'Keyword stuffing hurts AI trust signals.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Excessive keyword repetition signals low-quality content. AI systems penalize unnatural keyword density and prefer varied, natural language.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
}
}
return $tips;
}
/**
* Generate Technical AEO & SEO Foundations tips (Phase 2).
*/
private static function generate_technical_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Technical AEO & SEO Foundations', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'clean_url':
$tips[] = array(
'id' => 'technical_clean_url',
'severity' => $severity,
'priority' => 65,
'score_impact' => 3,
'message' => __( 'Use clean, descriptive URL slug', 'ai-answer-toolkit' ),
'impact_text' => __( 'Improves crawlability and user understanding.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Descriptive URLs help AI understand page topic before crawling. Avoid numbers, dates, or generic slugs. Use keywords that match your content.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'meta_description':
$tips[] = array(
'id' => 'technical_meta_desc',
'severity' => $severity,
'priority' => 66,
'score_impact' => 4,
'message' => __( 'Add meta description (120+ characters)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Used by AI for content summaries.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Meta descriptions provide concise content summaries. AI systems use them for snippet generation and relevance scoring.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'mobile_friendly':
$tips[] = array(
'id' => 'technical_mobile',
'severity' => $severity,
'priority' => 55,
'score_impact' => 5,
'message' => __( 'Ensure mobile-friendly content structure', 'ai-answer-toolkit' ),
'impact_text' => __( 'Mobile-first indexing affects AI visibility.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Most AI queries come from mobile devices. Mobile-friendly formatting ensures your content is accessible and readable on all devices.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'fast_load':
$tips[] = array(
'id' => 'technical_speed',
'severity' => $severity,
'priority' => 67,
'score_impact' => 3,
'message' => __( 'Optimize content size for faster loading', 'ai-answer-toolkit' ),
'impact_text' => __( 'Page speed affects crawl budget and ranking.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Fast-loading pages get crawled more frequently. Optimize images, minimize code, and reduce content bloat.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'internal_linking':
$tips[] = array(
'id' => 'technical_internal_links',
'severity' => $severity,
'priority' => 68,
'score_impact' => 3,
'message' => __( 'Add internal links to related content', 'ai-answer-toolkit' ),
'impact_text' => __( 'Helps AI discover and understand content relationships.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Internal links create topical clusters. AI systems use link structure to understand content hierarchy and related topics.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'image_optimization':
$tips[] = array(
'id' => 'technical_images',
'severity' => $severity,
'priority' => 69,
'score_impact' => 3,
'message' => __( 'Add alt text to all images', 'ai-answer-toolkit' ),
'impact_text' => __( 'Improves accessibility and AI understanding.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Alt text helps AI understand image content. Descriptive alt text improves multimodal search and accessibility.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'canonical_url':
$tips[] = array(
'id' => 'technical_canonical',
'severity' => $severity,
'priority' => 70,
'score_impact' => 2,
'message' => __( 'Set canonical URL properly', 'ai-answer-toolkit' ),
'impact_text' => __( 'Prevents duplicate content issues.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Canonical tags tell AI which version of content is authoritative. Essential for avoiding duplicate content penalties.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'no_broken_format':
$tips[] = array(
'id' => 'technical_formatting',
'severity' => $severity,
'priority' => 71,
'score_impact' => 2,
'message' => __( 'Fix broken HTML formatting (empty tags)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Clean HTML improves parsing accuracy.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Empty or broken HTML tags can confuse content parsers. Clean, valid HTML ensures accurate content extraction.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
}
}
return $tips;
}
/**
* Generate Answer Extraction Readiness tips (Phase 2).
*/
private static function generate_extraction_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Answer Extraction Readiness', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'topic_sentences':
$tips[] = array(
'id' => 'extraction_topic_sentences',
'severity' => $severity,
'priority' => 72,
'score_impact' => 3,
'message' => __( 'Start paragraphs with clear topic sentences', 'ai-answer-toolkit' ),
'impact_text' => __( 'Helps AI identify main points quickly.', 'ai-answer-toolkit' ),
'ai_why' => __( 'AI systems often extract the first sentence of paragraphs as summaries. Clear topic sentences improve answer extraction accuracy.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'scannable_format':
$tips[] = array(
'id' => 'extraction_scannable',
'severity' => $severity,
'priority' => 73,
'score_impact' => 4,
'message' => __( 'Use scannable formatting (lists, bold, headings)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Improves content parsing and extraction.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Lists, bold text, and headings create visual hierarchy. AI systems use these signals to identify and extract key information.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'fact_based':
$tips[] = array(
'id' => 'extraction_facts',
'severity' => $severity,
'priority' => 74,
'score_impact' => 3,
'message' => __( 'Include fact-based statements with numbers and data', 'ai-answer-toolkit' ),
'impact_text' => __( 'Increases answer credibility and citation potential.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Specific numbers, statistics, and data points are highly extractable. AI systems prefer factual, verifiable information for answers.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'quotable_snippets':
$tips[] = array(
'id' => 'extraction_quotable',
'severity' => $severity,
'priority' => 75,
'score_impact' => 3,
'message' => __( 'Create quotable snippets (10-30 word sentences)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Perfect length for featured snippets.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Concise, standalone sentences (10-30 words) are ideal for extraction. They provide complete answers without requiring additional context.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'definition_style':
$tips[] = array(
'id' => 'extraction_definitions',
'severity' => $severity,
'priority' => 76,
'score_impact' => 2,
'message' => __( 'Add definition-style content (is, means, refers to)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Answers "what is" queries directly.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Definition patterns (X is Y, X means Z) are highly extractable. Perfect for knowledge panels and direct answers.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'step_by_step':
$tips[] = array(
'id' => 'extraction_steps',
'severity' => $severity,
'priority' => 77,
'score_impact' => 3,
'message' => __( 'Add step-by-step instructions where applicable', 'ai-answer-toolkit' ),
'impact_text' => __( 'Ideal for "how-to" answer extraction.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Sequential instructions (first, then, next, finally) are perfect for process-based queries. AI systems can extract and display step-by-step guides.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'comparison_tables':
$tips[] = array(
'id' => 'extraction_tables',
'severity' => $severity,
'priority' => 78,
'score_impact' => 3,
'message' => __( 'Add comparison tables or structured data', 'ai-answer-toolkit' ),
'impact_text' => __( 'Tables are highly extractable by AI.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Tables provide structured comparisons. AI systems can easily parse and present tabular data in answer formats.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
}
}
return $tips;
}
/**
* Generate AI & LLM Optimization tips (Phase 2).
*/
private static function generate_ai_llm_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'AI & LLM Optimization Signals', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'prompt_friendly':
$tips[] = array(
'id' => 'ai_llm_prompt_friendly',
'severity' => $severity,
'priority' => 79,
'score_impact' => 2,
'message' => __( 'Use prompt-friendly language (how-to, what-is, guide)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Aligns with how users query AI systems.', 'ai-answer-toolkit' ),
'ai_why' => __( 'LLMs are trained on instructional content. Using prompt-style language (how to, what is, guide) increases relevance for AI-generated answers.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'context_complete':
$tips[] = array(
'id' => 'ai_llm_context',
'severity' => $severity,
'priority' => 80,
'score_impact' => 3,
'message' => __( 'Write context-complete paragraphs (50+ words)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Provides sufficient context for AI extraction.', 'ai-answer-toolkit' ),
'ai_why' => __( 'LLMs need complete context to generate accurate answers. Short paragraphs lack necessary information. Aim for 50+ word paragraphs with full context.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'low_ambiguity':
$tips[] = array(
'id' => 'ai_llm_ambiguity',
'severity' => $severity,
'priority' => 81,
'score_impact' => 3,
'message' => __( 'Reduce ambiguous pronouns (it, this, that)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Improves AI comprehension accuracy.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Ambiguous pronouns confuse AI systems. Replace "it" and "this" with specific nouns to ensure AI correctly understands references.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'explicit_structure':
$tips[] = array(
'id' => 'ai_llm_structure',
'severity' => $severity,
'priority' => 82,
'score_impact' => 2,
'message' => __( 'Use explicit subject-verb-object structure', 'ai-answer-toolkit' ),
'impact_text' => __( 'Simplifies AI parsing and understanding.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Clear sentence structure (subject-verb-object) is easier for AI to parse. Avoid complex nested clauses and passive voice.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'minimal_jargon':
$tips[] = array(
'id' => 'ai_llm_jargon',
'severity' => $severity,
'priority' => 83,
'score_impact' => 2,
'message' => __( 'Minimize jargon or explain technical terms', 'ai-answer-toolkit' ),
'impact_text' => __( 'Improves accessibility and AI confidence.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Unexplained jargon reduces AI confidence in answers. Define technical terms or use parenthetical explanations.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'consistent_terminology':
$tips[] = array(
'id' => 'ai_llm_terminology',
'severity' => $severity,
'priority' => 84,
'score_impact' => 2,
'message' => __( 'Use consistent terminology throughout', 'ai-answer-toolkit' ),
'impact_text' => __( 'Helps AI build coherent understanding.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Switching between synonyms can confuse AI entity recognition. Use consistent terms for key concepts throughout your content.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
}
}
return $tips;
}
/**
* Generate E-E-A-T & Trust tips (Phase 2).
*/
private static function generate_eeat_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'E-E-A-T & Trust Signals', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'author_credentials':
$tips[] = array(
'id' => 'eeat_author',
'severity' => $severity,
'priority' => 85,
'score_impact' => 4,
'message' => __( 'Add author bio with credentials (50+ chars)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Establishes expertise and authority.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Author credentials signal expertise. AI systems evaluate author authority when determining content trustworthiness and citation worthiness.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'publication_dates':
$tips[] = array(
'id' => 'eeat_dates',
'severity' => $severity,
'priority' => 86,
'score_impact' => 2,
'message' => __( 'Display publication and update dates', 'ai-answer-toolkit' ),
'impact_text' => __( 'Shows content freshness and maintenance.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Visible dates help AI assess content freshness. Regular updates signal active maintenance and current information.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'external_citations':
$tips[] = array(
'id' => 'eeat_citations',
'severity' => $severity,
'priority' => 87,
'score_impact' => 3,
'message' => __( 'Add external citations and sources', 'ai-answer-toolkit' ),
'impact_text' => __( 'Increases credibility and verifiability.', 'ai-answer-toolkit' ),
'ai_why' => __( 'External links to authoritative sources demonstrate research depth. AI systems value verifiable, well-sourced content.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'original_research':
$tips[] = array(
'id' => 'eeat_original',
'severity' => $severity,
'priority' => 88,
'score_impact' => 4,
'message' => __( 'Expand with original research and insights (800+ words)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Demonstrates expertise and unique value.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Original insights and research signal expertise. AI systems prioritize unique, valuable content over generic information.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'contact_info':
$tips[] = array(
'id' => 'eeat_contact',
'severity' => $severity,
'priority' => 89,
'score_impact' => 2,
'message' => __( 'Ensure contact/about information is accessible', 'ai-answer-toolkit' ),
'impact_text' => __( 'Builds trust and transparency.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Accessible contact information signals legitimacy. AI systems check for trust signals like contact pages and about sections.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'transparent_methodology':
$tips[] = array(
'id' => 'eeat_methodology',
'severity' => $severity,
'priority' => 90,
'score_impact' => 2,
'message' => __( 'Mention research methodology or process', 'ai-answer-toolkit' ),
'impact_text' => __( 'Shows rigor and transparency.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Transparent methodology (how you researched, tested, or analyzed) builds credibility. AI systems value content that explains its process.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
}
}
return $tips;
}
/**
* Generate Analytics & Future Readiness tips (Phase 2).
*/
private static function generate_analytics_tips( $checks, $post_id ) {
$tips = array();
$category = __( 'Analytics, Testing & Future Readiness', 'ai-answer-toolkit' );
foreach ( $checks as $check_id => $check ) {
$is_passed = isset( $check['passed'] ) && $check['passed'];
$severity = $is_passed ? 'success' : 'warning';
switch ( $check_id ) {
case 'content_freshness':
$tips[] = array(
'id' => 'analytics_freshness',
'severity' => $severity,
'priority' => 91,
'score_impact' => 3,
'message' => __( 'Update content (last updated over 6 months ago)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Fresh content ranks better in AI results.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Content freshness is a ranking signal. Regular updates show active maintenance and current information, which AI systems prioritize.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'engagement_potential':
$tips[] = array(
'id' => 'analytics_engagement',
'severity' => $severity,
'priority' => 92,
'score_impact' => 2,
'message' => __( 'Add CTAs or enable comments for engagement', 'ai-answer-toolkit' ),
'impact_text' => __( 'Engagement signals content value.', 'ai-answer-toolkit' ),
'ai_why' => __( 'User engagement (comments, CTAs, interactions) signals content value. AI systems consider engagement metrics when ranking content.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'multiformat_content':
$tips[] = array(
'id' => 'analytics_multiformat',
'severity' => $severity,
'priority' => 93,
'score_impact' => 2,
'message' => __( 'Add images or videos to text content', 'ai-answer-toolkit' ),
'impact_text' => __( 'Multi-format content improves engagement.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Rich media (images, videos) increases engagement and dwell time. AI systems favor comprehensive, multi-format content.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'voice_optimization':
$tips[] = array(
'id' => 'analytics_voice',
'severity' => $severity,
'priority' => 94,
'score_impact' => 2,
'message' => __( 'Use question-based title for voice search', 'ai-answer-toolkit' ),
'impact_text' => __( 'Optimizes for voice assistant queries.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Voice searches are question-based. Titles with how, what, why, when, where, who match voice query patterns.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
case 'future_proof':
$tips[] = array(
'id' => 'analytics_future_proof',
'severity' => $severity,
'priority' => 95,
'score_impact' => 2,
'message' => __( 'Use modular block structure (5+ blocks)', 'ai-answer-toolkit' ),
'impact_text' => __( 'Modular content is easier to update and repurpose.', 'ai-answer-toolkit' ),
'ai_why' => __( 'Block-based content is modular and reusable. AI systems can extract and recombine blocks for different contexts and formats.', 'ai-answer-toolkit' ),
'category' => $category,
);
break;
}
}
return $tips;
}
/**
* Create success tip for high scores.
*/
private static function create_success_tip( $score ) {
return array(
'id' => 'ultimate_success',
'severity' => 'success',
'priority' => 999,
'score_impact' => 0,
'message' => sprintf( __( 'Excellent! Your content scores %d/100 for AI Answer Readiness', 'ai-answer-toolkit' ), $score ),
'impact_text' => __( 'Your content is well-optimized for AI answer engines', 'ai-answer-toolkit' ),
'ai_why' => __( 'Continue maintaining this quality. Monitor AI referral traffic and featured snippet performance to identify further optimization opportunities.', 'ai-answer-toolkit' ),
'category' => __( 'Overall AEO Quality', 'ai-answer-toolkit' ),
'action_target' => '',
);
}
}