=== GEO Content Score ===
Contributors:      melihandic
Tags:              seo, ai, content, geo, llm
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      7.4
Stable tag:        1.3.0
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Score your posts for Generative Engine Optimization (GEO) using Groq (free), Anthropic Claude, or Google Gemini — so AI assistants cite your content more.

== Description ==

**GEO Content Score** analyzes your WordPress posts and pages for Generative Engine Optimization (GEO) and returns a detailed score across six criteria. All output is admin-only — your readers never see it.

**What is GEO?**
Generative Engine Optimization is the practice of structuring content so that AI assistants (ChatGPT, Claude, Gemini, Perplexity) are more likely to surface and cite it when answering user queries.

**AI Providers**

* **Groq** (recommended) — Llama 3.3 70B, truly free, no credit card. 1,000 req/day.
* **Anthropic Claude** — claude-haiku, ~$0.0003/analysis. Requires paid credits.
* **Google Gemini** — gemini-2.5-flash-lite. Requires a billing account in Google AI Studio (free usage available after setup).

**Scoring Criteria**
* E-E-A-T — Experience, Expertise, Authoritativeness, Trustworthiness
* Structure — Heading hierarchy, list usage, paragraph layout
* Content Depth — Comprehensiveness, originality, analytical depth
* Citations & Links — Source attribution, data references, external links
* Clarity — Readability, fluency, jargon balance
* Entity Density — Richness of named people, places, brands, and concepts

**Key Features**
* GEO score (0–100), letter grade, and LLM citation likelihood
* Scores are cached — re-analysis only needed when content changes
* Stale score indicator when post content has been edited since last analysis
* Actionable AI recommendations (English or Turkish)
* GEO Score column in Posts list with hover tooltip showing all criteria, summary, and top recommendation
* Live language and provider switching in Settings (no page reload)
* Monthly API call tracker with configurable limit and 90% warning
* "Settings" shortcut in the plugin action links
* Admin-only — zero frontend impact

**Languages**
English and Turkish. Switch instantly from Settings.

= Privacy & External API Usage =

Data sent on each analysis (manual only — never automatic):
* Post title and excerpt
* First ~3,500 characters of post content (HTML stripped)
* Structural signals: word count, headings, lists, links, images

**Groq**
* Endpoint: `https://api.groq.com/openai/v1/chat/completions`
* Privacy: https://groq.com/privacy-policy
* Terms: https://groq.com/terms-of-use

**Anthropic Claude**
* Endpoint: `https://api.anthropic.com/v1/messages`
* Privacy: https://www.anthropic.com/privacy
* Terms: https://www.anthropic.com/terms
* Pricing: https://www.anthropic.com/pricing

**Google Gemini**
* Endpoint: `https://generativelanguage.googleapis.com/v1beta/models/...`
* Privacy: https://policies.google.com/privacy
* Terms: https://ai.google.dev/gemini-api/terms
* Note: Requires a billing account in Google AI Studio since March 2026.

== Installation ==

1. Upload `geo-content-score` to `/wp-content/plugins/`
2. Activate from **Plugins → Installed Plugins**
3. Go to **Settings → GEO Content Score**
4. Select a provider and enter the API key
5. Open any post — the **GEO Content Score** panel appears in the right sidebar

**Getting API Keys (free)**
* **Groq:** https://console.groq.com/keys — email only, no credit card
* **Google Gemini:** https://aistudio.google.com/app/apikey — requires billing account linked

== Frequently Asked Questions ==

= Which provider should I use? =

Start with **Groq** — it's free, no credit card, and Llama 3.3 70B delivers high-quality GEO analysis. 1,000 analyses per day is more than enough for most sites.

= Are scores saved between sessions? =

Yes. Scores are saved in post meta and displayed immediately on every visit to the editor. A notice appears if the post content has changed since the last analysis.

= Does the score appear on my website? =

No. All plugin output is admin-only.

= Can I analyze custom post types? =

Yes — use the `gcs_post_types` filter.

== Screenshots ==

1. GEO Content Score meta box in the post editor
2. Settings page with provider cards
3. GEO Score column in the Posts list with hover tooltip

== Changelog ==

= 1.3.0 =
* Cleaned up Settings page — provider cards now show only what's needed (notice + API key field)
* Added tooltip to Posts list GEO Score column: hover to see all criteria bars, summary, and top recommendation
* Scores now persist across sessions and are displayed without re-analyzing
* "Re-analyze" button shown when content has changed since last analysis
* Simplified all API error messages to be user-friendly and actionable
* Removed verbose info tables from Gemini and Claude provider cards
* Added `get_api_key()` and `content_hash()` helper methods for cleaner code
* CSS now also loads on the Posts list screen for tooltip rendering

= 1.2.0 =
* Added Groq support (Llama 3.3 70B, free tier, no credit card required)
* Groq is now the default provider on fresh installations
* Live provider switching — cards update instantly without page reload
* Updated Gemini to gemini-2.5-flash-lite (billing required since March 2026)

= 1.1.0 =
* Added Google Gemini support
* Live language switching — all labels update without page reload
* Added monthly API usage tracker with configurable limit
* GEO Score column in Posts list table
* Migrated to separate API key options per provider

= 1.0.0 =
* Initial release with Anthropic Claude support

== Upgrade Notice ==

= 1.3.0 =
No manual steps needed. Existing scores are preserved.
