=== Citebee AI Readiness ===
Contributors: jianxp001
Tags: seo, geo, llms.txt, schema, robots.txt
Requires at least: 5.2
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight GEO readiness audit: check whether robots.txt blocks AI crawlers, verify llms.txt, scan homepage Schema — plus a 0-100 score.

== Description ==

Citebee AI Readiness is a lightweight plugin for Generative Engine Optimization (GEO). It runs exactly three checks — the ones that decide whether AI search engines can understand and cite your content — and turns the result into a score plus an actionable fix list. Paste a URL, get an answer in seconds, no configuration required.

= 1. Does robots.txt block AI crawlers? (weight 40) =

Fetches the target site's robots.txt and evaluates each mainstream AI crawler individually — GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, PerplexityBot, Google-CloudVertexBot and CCBot — as Allowed, Blocked or Not specified. The parser handles the tricky cases correctly: consecutive `User-agent` lines that share one rule group, and wildcard `User-agent: *` combined with `Disallow: /`, which blocks the entire site.

= 2. Does an llms.txt exist, and is it well formed? (weight 30) =

Looks for llms.txt in the site root. If it exists, the plugin validates the basic structure: a `#` title line, a `>` one-line site definition directly below it, and at least one `[link text](URL)` Markdown link — telling you exactly which parts are missing.

= 3. Does the homepage emit basic Schema markup? (weight 30) =

Retrieves the front page HTML, extracts every `<script type="application/ld+json">` block (fault tolerant, supports `@graph` and nested arrays), walks the parsed object to collect `@type` values, and reports the four GEO-critical types: Organization, WebSite, WebPage, and Article (matching BlogPosting and similar aliases). Every type detected is listed.

= What you get =

* A single 0-100 GEO readiness score (weighted 40 + 30 + 30).
* Green / yellow / red status per check, with concrete findings such as "GPTBot is blocked", "no llms.txt found" or "no Organization Schema detected".
* Actionable suggestions for every failing item: how to drop a Disallow rule, how to complete the three-part llms.txt, how to emit Organization / WebSite JSON-LD.
* Every run is stored in a custom table, so past reports can be reopened or deleted for side-by-side comparison.

= Privacy and performance =

* No data is sent to third parties. Audits use the WordPress HTTP API against the URL you enter and its /robots.txt and /llms.txt; results stay in your own database.
* All output is escaped with esc_html / esc_url / wp_kses_post, queries use `$wpdb->prepare`, the form is protected by a Nonce, and record deletion asks for confirmation.
* No dependencies, no external SDK, and the whole plugin folder stays under 30 KB.

= Who should use it =

Site owners and webmasters who want to know whether ChatGPT, Claude, Perplexity and other AI engines can actually reach and interpret their pages — and, more importantly, what to fix if they cannot.

== Installation ==

1. Upload the `citebee-ai-readiness` folder (or the ZIP file) to `/wp-content/plugins/`, or upload it from Plugins → Add New → Upload Plugin.
2. Activate Citebee AI Readiness on the Plugins screen.
3. Open "Citebee AI Readiness" in the admin menu, enter a URL and run the audit.

== Frequently Asked Questions ==

= Why do I lose points even though I do not block AI crawlers? =

GEO is about making your content easier for AI engines to understand and cite. If blocking some crawlers is intentional, simply ignore the matching deduction — the report only states the situation and suggests fixes, it never forces a change. A site with no AI crawler rules at all scores 20 out of 40 on this module, because "no rule" means the policy has not been stated yet.

= Is my data sent to any third party? =

No. The plugin only makes server-side HTTP requests (via the WordPress HTTP API) to the URL you enter, plus its /robots.txt and /llms.txt. Audit results are stored in your own database.

= Which AI crawlers are checked? =

Eight mainstream bots: GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, PerplexityBot, Google-CloudVertexBot and CCBot.

= Does the plugin add anything to my site's front end? =

No. Citebee AI Readiness is admin-only: no front-end markup, no tracking, no external requests other than the ones described above.

== Changelog ==

= 1.0.0 =
* First release: robots.txt AI crawler check, llms.txt format check, homepage Schema scan, 0-100 score report and audit history.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
