Overview
The analyzer system is modular and extensible, with each analyzer returning scored results and actionable recommendations.Analyzer Architecture
All analyzers are located inincludes/analyzers/ and follow a consistent pattern:
1. Keyword Analyzer
File:includes/analyzers/class-keyword-analyzer.php
Analyzes content for focus keyword optimization across multiple dimensions.
Usage
Analysis Criteria
Title Analysis (20 points)
Title Analysis (20 points)
- Checks if keyword appears in title
- Bonus points if keyword appears in first 10 characters
- Issue IDs:
keyword_not_in_title,keyword_in_title_start,keyword_in_title
Meta Description (15 points)
Meta Description (15 points)
- Verifies keyword presence in meta description
- Checks if meta description exists
- Issue IDs:
no_meta_description,keyword_not_in_meta,keyword_in_meta
URL/Slug (10 points)
URL/Slug (10 points)
- Sanitizes keyword and checks URL slug
- Issue IDs:
keyword_not_in_slug,keyword_in_slug
First Paragraph (15 points)
First Paragraph (15 points)
- Checks if keyword appears in opening paragraph
- Issue IDs:
keyword_not_in_first_para,keyword_in_first_para
Keyword Density (20 points)
Keyword Density (20 points)
- Ideal range: 0.5% - 2.5%
- Too low: < 0.3% (5 points)
- Too high: > 3.0% (5 points, keyword stuffing warning)
- Optimal: 0.5-2.5% (20 points)
- Issue IDs:
keyword_density_low,keyword_density_high,keyword_density_good
Distribution (20 points)
Distribution (20 points)
- Divides content into 3 sections
- Checks keyword presence across sections
- 0 sections: 0 points (error)
- 1 section: 7 points (warning)
- 2 sections: 15 points (ok)
- 3 sections: 20 points (good)
- Issue IDs:
keyword_not_distributed,keyword_poorly_distributed,keyword_fairly_distributed,keyword_well_distributed
Return Data
2. Readability Analyzer
File:includes/analyzers/class-readability-analyzer.php
Evaluates content readability using Flesch Reading Ease and other metrics.
Usage
Analysis Criteria
Flesch Reading Ease
25 points - Uses formula:Score Ranges:
- 60+: Good (25 points)
- 50-59: Acceptable (18 points)
- Below 50: Difficult (10 points)
Sentence Length
20 points - Average words per sentence
-
25% sentences over 20 words: Warning (10 points)
- Otherwise: Good (20 points)
Paragraph Length
15 points - Words per paragraph
-
30% paragraphs over 150 words: Warning (8 points)
- Otherwise: Good (15 points)
Subheadings
15 points - H2-H6 distribution
- Less than 300 words: Optional (15 points)
- No subheadings: Error (0 points)
- More than 300 words per subheading: Warning (8 points)
- Good distribution: 15 points
Passive Voice
15 points - Active vs passive usage
-
20% passive: Warning (8 points)
- Otherwise: Good (15 points)
Transition Words
10 points - Sentence connectors
- Less than 20% sentences with transitions: Warning (5 points)
- ≥20%: Good (10 points)
Return Data
3. Content Insights
File:includes/analyzers/class-content-insights.php
Provides word frequency analysis and content metrics.
Usage
Features
- Word Frequency
- Phrase Frequency
- Content Metrics
- Recommendations
Returns top 30 words (excluding stop words) with:Filters out 100+ common stop words.
Prominent Words
4. Internal Linking
File:includes/analyzers/class-internal-linking.php
Suggests relevant internal links based on keyword matching.
Usage
How It Works
Extract Keywords
Analyzes content to extract top 20 keywords (excluding stop words), weighted by frequency.
Find Related Posts
Searches database for published posts/pages containing those keywords in title or content.
Calculate Relevance
Scores each post based on:
- Title matches: 2× weight
- Content matches: 1× weight (capped at 5 mentions)
- Normalized to 0-1 scale
Suggestion Data
Helper Methods
5. SEO Dashboard
File:includes/analyzers/class-seo-dashboard.php
Provides site-wide SEO health analysis and statistics.
Usage
Dashboard data is cached for 5 minutes using WordPress transients. Cache is automatically cleared when posts are saved or deleted.
Dashboard Data Structure
Performance Optimization
Extending Analyzers
Create custom analyzers by following the base pattern:Related Resources
WP-CLI Commands
Run analyzers from command line
Hooks & Filters
Customize analyzer behavior
API Reference
REST API endpoints for analyzers
Architecture
Plugin structure overview