=== CiteWP AI Search Optimizer – Get Cited by ChatGPT, Perplexity & Claude ===
Contributors: bradleyswpc
Tags: ai seo, generative engine optimization, llms.txt, chatgpt seo, ai citations
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 0.7.15
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

SEO gets you ranked. CiteWP gets you cited. 17-signal AI citation score, AI crawler tracking, and llms.txt — free, no API key required.

== Description ==

**Show up when ChatGPT, Perplexity, Claude, and Google AI answer your customers' questions.**

Your content can rank on the first page of Google and still be completely invisible to AI assistants. CiteWP measures exactly why — and shows you what to fix.

It's the only WordPress plugin with a public, rubric-based AI citation score. Every signal, every weight, fully documented at citewp.com/cite-score. No black box. No API key required. Scores run locally on your server, free forever.

Works alongside Yoast SEO, Rank Math, SEOPress, and AIOSEO — your SEO plugin gets you ranked; CiteWP gets you cited.

= The Cite Score =

Most AI SEO tools give you a number. CiteWP shows you the number, explains every point, and tells you exactly what to fix.

The Cite Score measures 17 weighted signals across three categories:

* **Structure** — heading hierarchy, answer-first formatting, passage length, semantic HTML
* **Citability** — statistics density, named entities, FAQ content, self-contained passages
* **Authority** — schema markup, author signals, internal linking, content depth

Every signal is documented at citewp.com/cite-score with research citations for every weight. Unlike competitor "AI scores," there is no black box — SEO professionals can audit, explain, and defend every recommendation to their clients.

= What's Included — Free, Forever =

✅ **Cite Score** — a transparent 100-point AI citation readiness score across 17 documented signals (Structure, Citability, Authority). See the score, the per-signal breakdown, and your top 3 highest-impact fixes — right in the editor and on the dashboard. Every weight is public at citewp.com/cite-score. No black box.

✅ **86 AI crawlers tracked** — log visits from GPTBot, ClaudeBot, PerplexityBot, Google-Extended, DeepSeek, and 80+ other verified AI bots across 19 vendors. See what they fetch, which pages get attention, and which published pages no AI bot has ever touched. Filter by bot, filter by date, export to CSV. Most plugins track a handful — CiteWP tracks 86.

✅ **AI Blind Spots** — instantly surface published content that AI crawlers have never visited, so you know exactly where your coverage gaps are.

✅ **Cite Score Over Time** — watch your site-wide and per-post citation readiness trend across your chosen window. Confirm your fixes are actually moving the number.

✅ **llms.txt generation** — auto-generate /llms.txt and /llms-full.txt from your most important content, with cornerstone prioritization. Respects Yoast, Rank Math, SEOPress, and AIOSEO settings automatically, and updates as you publish.

✅ **Cite Score in every editor** — Gutenberg sidebar plus a universal meta box that brings the score, category breakdown, recommendations, and bot activity to Classic Editor, Elementor, Divi, Beaver Builder, and Bricks. Check your score without leaving the page.

✅ **Schema suggestions + scoring** — one-click Article and FAQPage JSON-LD, injected cleanly into the page head (never pasted into your content). Scoring also credits authority-entity schema — Product, Organization, Person, SoftwareApplication, LocalBusiness — so service, product, and landing pages aren't penalized for not being blog posts. FAQ detection works with Kadence, Elementor, Divi, Beaver Builder, Bricks, Spectra, and HTML5 accordions.

✅ **AI recommendations, ranked by points** — the dashboard surfaces your highest-impact fixes, grouped by signal and post type, ranked by recoverable Cite Score points. No guessing what to work on next.

✅ **Post list column + dashboard widget** — a sortable Cite Score column in All Posts and All Pages, plus an at-a-glance widget for your site-wide average, top crawled pages, and AI bot activity.

Everything above is free, forever — no API key, no external account, no per-analysis cost.

= Why no API key? =

Other AI SEO plugins require you to connect an OpenAI or Anthropic API key just to see your score — meaning every analysis costs you money and sends your content to an external server.

CiteWP scores your content locally on your own WordPress server. No API key. No per-analysis cost. No data leaving your site. The full feature set is free, forever.

= Who this is for =

✅ **Bloggers and content publishers** — your audience is already asking AI for recommendations. Be the source they cite.

✅ **SEO professionals and agencies** — measure AI citation readiness across client sites with a transparent, auditable rubric you can explain and defend.

✅ **Founders and small-business owners** — if you own your WordPress site and want to show up in AI search, this is where you start.

✅ **SaaS companies and documentation sites** — AI engines cite authoritative reference content. Measure whether yours qualifies.

= White-hat by design =

Some AI SEO plugins work by serving a different, "optimized" version of your page to AI crawlers — a technique that's functionally cloaking and carries real risk under Google's spam policies.

CiteWP takes the opposite approach: measure your actual content, find the gaps, fix them. Your real page gets better for AI and humans alike. No separate version for bots. No CDN dependency. No cloaking risk.

= Built by CiteWP =

CiteWP is a dedicated AI search optimization tool built specifically for WordPress. Visit citewp.com for documentation, the full scoring rubric, and blog posts on Generative Engine Optimization (GEO).

== Installation ==

1. Upload the plugin to /wp-content/plugins/, or install via Plugins → Add New.
2. Activate.
3. AI crawler tracking and llms.txt generation start automatically.
4. Open any post or page to see the Cite Score in the editor sidebar.

== Frequently Asked Questions ==

= Do I need an API key or external account? =

No. CiteWP scores your content locally on your own WordPress server. No OpenAI key, no Anthropic key, no external account, no per-analysis cost. Other AI SEO plugins make you connect a paid API key just to generate a score — which means every scan costs you money and sends your content to a third party. CiteWP sends nothing. Your content never leaves your site.

= Will this slow down my site? =

No. Scoring runs in the background on post save and on manual recalculation — never on front-end page loads. Crawler tracking adds a lightweight log entry only when an AI bot visits, with zero impact on regular visitor performance.

= Does CiteWP use any black-hat tricks? =

No. Some tools "optimize" by serving a different version of your page to AI crawlers — functionally cloaking, and a real risk under search spam policies. Others sell manufactured signals. CiteWP does neither. It measures your real content, finds the gaps, and helps you fix them. The same page gets better for AI engines and human readers alike. No separate version for bots, no CDN dependency, no manufactured activity.

= How is this different from other AI SEO plugins? =

Three things:

1. **Public rubric.** All 17 signals and their weights are documented at citewp.com/cite-score, with a research citation behind every weight. Every other AI scoring tool hides its formula.
2. **No API key, free forever.** The full feature set runs locally at no cost. No paid key required to see your score.
3. **Per-signal recommendations.** You get the 3 highest-impact fixes on your site right now, ranked by recoverable points — not just a number.

= Is the Cite Score formula really public? =

Yes. The full 100-point rubric is at https://citewp.com/cite-score with a research citation behind every signal weight. You can audit it, explain it to a client, and defend every recommendation.

= Does this replace my SEO plugin? =

No, and it's not meant to. CiteWP runs alongside Yoast SEO, Rank Math, SEOPress, and AIOSEO. They handle rankings, meta tags, and sitemaps; CiteWP handles AI citation readiness. Run both together.

= What's an llms.txt file? =

An emerging standard that tells AI engines which of your content matters most. CiteWP generates it automatically — the way an SEO plugin generates sitemap.xml — and keeps it current as you publish or update posts.

= Does this work with WooCommerce and page builders? =

Yes to both. Cite Score and llms.txt work with any post type, including WooCommerce products. The score and schema tools work in Gutenberg, Classic Editor, Elementor, Divi, Beaver Builder, and Bricks. Crawler tracking is site-wide.

== Screenshots ==

1. Cite Score in the WordPress editor — a transparent 100-point AI citation readiness score with category breakdown (Structure, Citability, Authority) and signal-by-signal recommendations, shown live in the editor sidebar.
2. The CiteWP Dashboard — site-wide Cite Score health, AI bot visit totals, indexed-page coverage, top AI crawlers, and posts needing attention, all at a glance.
3. Cite Score in every editor — the universal meta box brings the per-post Cite Score, category breakdown, AI bot visits, and llms.txt controls to the Classic Editor and page builders, not just Gutenberg.
4. Crawler Logs — AI crawler activity across your site with total crawls, unique bots, pages crawled, a Bot Visits Over Time chart, top crawled pages, bot-type and date-range filters, and CSV export.
5. The Cite Score page — site-wide scoring overview with top crawler, optimization coverage, schema coverage, a score health gauge, category breakdown, and AI-powered recommendations.

== Changelog ==

= 0.7.15 =
* New: "Score all content" — backfill Cite Scores for published posts and pages that were never scored (content predating the plugin, or bulk-imported content). Run it from Settings → Maintenance, or via WP-CLI with `wp citewp-aiso backfill`. It scores in background batches so large sites don't time out.
* New: Content is now scored automatically whenever it is published through any path — including importers and bulk publishing — not only when a post is opened and saved in the editor.
* New: llms.txt include/exclude toggle column on the All Posts and All Pages screens. Defaults to on; flip a post in or out of llms.txt without opening it.
* Improvement: The dashboard "Indexed Pages" count now reflects all published content once scored, matching what /llms.txt actually contains.
* Update: Refreshed the listing — clearer Free feature descriptions and a reordered FAQ.

= 0.7.14 =
* Fix: Restored the correct text domain (citewp-ai-search-optimizer) after a 0.7.13 regression. No functional change.

= 0.7.13 =
* Fix: FAQ schema nested inside article schema (Rank Math's standard BlogPosting → subjectOf → FAQPage structure) is now correctly detected and credited — affected pages no longer cap at 5/8 for the FAQ Structure signal despite having valid FAQ schema.
* Fix: Recalculate no longer downgrades the Cite Score when the self-request loopback returns a non-200 response or an implausibly small body (blocked loopback, CDN challenge page, security plugin filtering the CiteWP UA). The existing cached detection result is preserved in those cases instead of being overwritten.

= 0.7.12 =
* Improvement: Schema insertion in the Classic Editor and page-builder meta box now injects into the page head — matching the block-editor sidebar — instead of copy-paste into content.
* Fix: Inserting schema via either the meta box or block-editor sidebar now correctly updates the Cite Score on Recalculate, including on sites where the self-request loopback is unavailable.
* Improvement: Category rows (Structure, Citability, Authority) in the meta box are now expandable — click any row to see individual signal scores and recommendations.
* Fix: Bot Visits panel in the Classic/page-builder meta box now correctly shows AI crawler activity for the current post (query was referencing columns that don't exist in the crawler log table).

= 0.7.11 =
* New: Schema scoring now credits authority-entity types — SoftwareApplication, Organization, Person, Product, LocalBusiness, and more — so product, landing, and service pages no longer score 0 for schema just because they aren't Articles.
* New: "Detected on this page" readout in the Schema Suggestions panel and editor meta box shows the schema types found on each post or page.
* New: AI crawler detection expanded from 43 to 86 verified bots (DeepSeek, Brave, PetalBot, Semrush, Ahrefs, social link-preview bots, and more).
* New: AI Blind Spots card on the Crawler Logs page surfaces published content that AI crawlers have not yet visited.
* New: "Hide excluded" toggle on the Post & Page Cite Scores table.
* Improvement: Top Crawled Pages now focuses on your posts and pages (site files stay in the full log and CSV export).
* Fix: Schema scoring message now names what schema was found instead of a misleading "no schema markup detected."
* Fix: Needs Attention card and AI Recommendation cards always reference the same top gap on large sites.
* Fix: Admin styles now cache-bust correctly so design updates appear immediately.
* Fix: Removed a broken tooltip on the Crawler Logs page.

= 0.7.10 =
* Improvement: AI Recommendations cards now group by signal and post type — Posts and Pages are shown as separate, targeted cards.
* Improvement: Cards ranked by recoverable Cite Score points so the highest-impact fixes surface first.
* Fix: "View N Posts/Pages" button now opens a curated list showing exactly those N affected items — not the full dashboard.
* Fix: Card count, button count, and filter-banner count now always agree (count-match contract restored).
* Fix: Recommendation filter correctly scopes to published content only, excluding llms.txt-opted-out posts.
* Improvement: Empty state shows a positive message when all content is fully optimized.
* Improvement: Statistics density scoring uses a raw-count floor for more consistent scoring across content lengths.
* Improvement: Named entity detection extended to CamelCase brand names (ChatGPT, WordPress, SEMrush, etc.).

= 0.7.9 =
* Schema detection now reads rendered page output, crediting FAQPage and Article schema from any emitter (Rank Math, Yoast, AIOSEO, hand-rolled JSON-LD) equally.
* Schema generation moved from post content insertion to head injection (wp_head), eliminating wpautop corruption and improving compatibility with caching plugins.
* FAQ and Article signals now score independently — Article signal credits validated Article schema only, not generic SEO-plugin presence.
* FAQ extractor fixes: CSS leak in text extraction, br-tag word-fusion, and whitespace handling.
* Tolerant JSON-LD parsing handles hand-crafted schema with embedded line breaks.
* Unicode handling fix — em-dashes and other escaped Unicode characters now render correctly in injected schema.
* Removed block-label as a schema-generation trigger to prevent overwriting existing user-authored schema.
* New REST endpoint POST /citewp/aiso/v1/schema/[id]/inject for Insert/Remove with conflict guard.
* AI Recommendations card on the Cite Score page now excludes llms.txt-opted-out posts from per-signal counts and card visibility, matching the rest of the dashboard's exclusion behavior.

= 0.7.8 =
* Schema detection — emitter-agnostic rendered-output detection via template_redirect full-page cache and sync self-request on Recalculate. Credits schema from Rank Math, Yoast, AIOSEO, and hand-rolled wp:html blocks equally.
* FAQ/Article signal independence — Article/Schema signal gates on Article-type validation, not presence of any schema type; FAQPage-only detections credit the FAQ signal only. Schema detection cache survives content edits and clears on post status transitions only (not every save).
* json_decode_tolerant — hand-crafted JSON-LD with literal CR/LF in string values (accepted by Google Rich Results, rejected by PHP's strict parser) now parsed correctly.
* Flag-don't-inject — CiteWP no longer offers to insert FAQPage schema when a valid FAQPage already exists on the rendered page, preventing Rich Result clobbering. Removes the Kadence block-label auto-generation trigger that caused duplicate FAQPage schema insertion.
* FAQ extraction fix — inline CSS from Kadence accordion blocks no longer leaks into acceptedAnswer.text; clean_text() strips style/script noise nodes before extracting text content.
* Head injection — Schema Suggestions Insert/Remove now stores generated schema in post meta and emits via wp_head, replacing block-editor insertion. Eliminates wpautop corruption of JSON-LD in post_content. Insert and Remove buttons backed by REST endpoint with detect-before-inject conflict guard.
* Schema storage — injected schema stored as serialized PHP array instead of JSON string, preventing wp_unslash from corrupting Unicode escapes (e.g. em-dash rendered as 'u2014').
* FAQ word-fusion fix — clean_text() replaces br elements with a space text node before reading textContent, preventing adjacent words from fusing at line breaks.

= 0.7.7 =
* Cite Score page — 'Excluded from llms.txt' pill on per-post table rows for posts excluded from llms.txt generation.
* Cite Score Over Time chart — sparse-data state shown when the selected window has fewer than 3 recorded data points.
* Left rail — 'Request a Feature' link below the Pro card.

= 0.7.6 =
First public release on WordPress.org.

* Cite Score — transparent 100-point AI citation readiness score across 17 signals in three categories (Structure, Citability, Authority). Full rubric published at https://citewp.com/cite-score with research citations for every weight.
* AI Crawler Tracking — log and filter visits from GPTBot, ClaudeBot, PerplexityBot, and 40+ other AI bots across 19 vendors. Bot-type and date-range filters, summary stats, CSV export.
* llms.txt Generation — automatic llms.txt and llms-full.txt with cornerstone content prioritization. Integrates with Yoast SEO, Rank Math, SEOPress, and AIOSEO.
* Cite Score in every editor — Gutenberg sidebar with per-signal drilldown and on-demand recalculation; universal meta box brings the Cite Score and schema suggestions to Classic Editor, Elementor, Divi, Beaver Builder, and Bricks.
* Schema Suggestions — one-click Article and FAQPage JSON-LD generation with per-post schema type selection. FAQ detection recognizes accordions from Kadence, Elementor, Divi, Beaver Builder, Bricks, Spectra, and HTML5 details/summary.
* Cite Score dashboard — site-wide score, score-over-time trend, per-post score table, AI recommendations, and schema coverage.
* Crawler Logs page — Bot Visits Over Time and Top Crawled Pages, with date-range-aware KPIs.
* Per-post llms.txt control — exclude individual posts or pages from llms.txt; excluded content is also dropped from aggregate score metrics.
* Dashboard widget — average Cite Score, top crawled pages, and AI bot activity at a glance.
