A VS Code extension that statically scans HTML, PHP/CodeIgniter 4, React/JSX, Vue, Svelte, and Markdown files for SEO problems, Google AdSense policy risks, structured-data gaps, and Core Web Vitals issues — and optionally uses VS Code's Language Model API (e.g. GitHub Copilot Chat) to suggest one-click fixes, simulate an AdSense reviewer, and estimate how AI-written your prose looks.
Static analysis runs locally with zero runtime dependencies and no telemetry. AI features are entirely optional and only activate when you trigger them.
Issues appear as inline squiggles and in the Problems panel. Severity ranges from error → warning → info.
| Category | Examples of what's flagged |
|---|---|
| SEO | Missing / too-short / too-long <title>, missing meta description, missing or malformed canonical, missing or multiple <h1>, skipped heading levels, missing alt on <img>, too few internal links, missing viewport / charset meta |
| Content quality | Word count under the "thin content" threshold, very thin pages (< 200 words) |
| AdSense policy risk | Missing Privacy Policy / About / Contact links, ads above the first paragraph of real content, ads next to navigation, excessive ad density, auto-ads on near-empty pages, duplicate AdSense loader scripts, keyword hits against a list of high-risk topics |
| Structured data | Missing JSON-LD, invalid JSON-LD, missing @context or @type |
| Core Web Vitals | <img> without width / height (CLS), images missing loading="lazy", render-blocking <script> in <head>, oversized inline <style> |
The analyzers operate on the source text using targeted regex (see Why no runtime dependencies). They run on open, save, and — if seoAdsense.enableAutoScan is on — debounced on edit.
When a supported file is active, three items appear on the right of the status bar:
errors✗ warnings⚠. Click to open the report panel.These all go through vscode.lm — typically powered by GitHub Copilot Chat. If no model is available, the AI features quietly disable themselves and static analysis keeps working. The extension never asks for an API key.
All commands are available from the Command Palette under the SEO/AdSense category. Some also appear in the editor title bar and right-click menu on supported file types.
| Command | What it does |
|---|---|
SEO/AdSense: Scan Current File |
Re-runs the static analyzers on the active file |
SEO/AdSense: Scan Entire Workspace |
Scans every supported file in the workspace |
SEO/AdSense: Show Report for Current File |
Opens the report / review WebView |
SEO/AdSense: Simulate Google AdSense Review |
Same panel, but also asks the LLM for a reviewer verdict |
SEO/AdSense: Fix All Issues with AI |
Iterates through every diagnostic with AI fixes |
SEO/AdSense: Detect AI-Written Likelihood |
Estimates how AI-generated the prose looks |
Supported languages: html, php, javascriptreact, typescriptreact, vue, svelte, markdown.
Open Settings → search "SEO/AdSense":
| Setting | Default | Purpose |
|---|---|---|
seoAdsense.minWordCount |
300 |
Threshold below which content is flagged as thin |
seoAdsense.recommendedWordCount |
800 |
Recommended depth for full articles |
seoAdsense.minInternalLinks |
2 |
Minimum recommended internal links per page |
seoAdsense.metaDescriptionMin / Max |
120 / 160 |
Meta description length window |
seoAdsense.titleMin / titleMax |
30 / 60 |
<title> length window |
seoAdsense.enableAutoScan |
true |
Re-scan on edit (debounced) in addition to open/save |
seoAdsense.languageModel |
auto |
Preferred model: auto, copilot-gpt-4o, copilot-gpt-4, copilot-claude-3.5-sonnet |
seoAdsense.checkAdSensePolicy |
true |
Toggle AdSense policy checks |
seoAdsense.checkSchema |
true |
Toggle JSON-LD / schema checks |
seoAdsense.checkCWV |
true |
Toggle Core Web Vitals checks |
Search "SEO AdSense Compliance Inspector" (publisher MMLTECH) in the Extensions view.
git clone https://github.com/mmlTools/seo-adsense-inspector.git
cd seo-adsense-inspector
npm install
npm run compile
# Open in VS Code and press F5 to launch the Extension Development Host
npm install
npm run package # uses @vscode/vsce to produce a .vsix
code --install-extension seo-adsense-inspector-*.vsix
The extension is written in TypeScript and compiled to out/.
seo-adsense-inspector/
├── package.json
├── tsconfig.json
├── src/
│ ├── extension.ts # Activation, commands, diagnostics, status bar
│ ├── types.ts
│ ├── analyzers/
│ │ ├── index.ts # Orchestrates all analyzers
│ │ ├── issues.ts # Issue codes, severities, fix prompts
│ │ ├── score.ts # 0-100 readiness score
│ │ ├── seoAnalyzer.ts
│ │ ├── contentAnalyzer.ts
│ │ ├── adsenseAnalyzer.ts
│ │ ├── schemaAnalyzer.ts
│ │ └── performanceAnalyzer.ts
│ ├── llm/
│ │ ├── aiFixer.ts # vscode.lm: per-issue and "fix all" flows
│ │ └── aiWrittenDetector.ts # AI-written-likelihood scoring
│ ├── providers/
│ │ └── codeActionProvider.ts # Lightbulb code actions
│ ├── views/
│ │ └── adsenseReviewPanel.ts # The review / report WebView
│ └── utils/
│ └── htmlUtils.ts # Regex-based HTML extraction
└── samples/
└── test.html
The extension ships zero runtime npm packages. HTML is parsed with targeted regex because:
The trade-off: pathological or unusual markup can produce false positives. Issue reports welcome.
(npm install is only required to build from source — TypeScript and @vscode/vsce are devDependencies.)
robots.txt, server response headers) are out of scope.Issues and pull requests are welcome at https://github.com/mmlTools/seo-adsense-inspector.
MIT