===  Greenlog SEO Tools ===
Contributors: greenlogfr
Tags: seo, seo checker, seo score, keyword analysis, seo audit
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free SEO checker for WordPress. Score posts & pages, analyze keywords, preview Google snippets — no AI, no account, no API calls.

== Description ==

**Greenlog SEO Tools** is a free WordPress SEO plugin that analyzes your posts and pages locally, gives you an SEO score (0–100), a detailed actionable checklist, a keyword analysis, and a Google SERP preview — all without any external requests.

**No AI. No external API. No account required.** Everything runs on your WordPress server.

= Who is this plugin for? =

* Bloggers and content creators who want a complete SEO audit without paying for SaaS tools.
* WordPress developers looking for a lightweight SEO score and keyword checker.
* Anyone using Yoast SEO, RankMath, or SEOPress who wants a complementary local analysis layer.
* Site owners managing multiple posts who need a quick SEO health check directly in the admin.

= What the SEO checker analyzes =

Each post or page gets a complete SEO analysis based on:

* **Title** — length, keyword placement, Google truncation
* **URL slug** — readability, length
* **Content** — word count, heading structure (H2, H3), H1 detection
* **Images** — presence, alt text optimization
* **Links** — internal links, external links
* **Meta description** — presence and length (reads Yoast SEO, RankMath, and SEOPress automatically)
* **Social** — Open Graph image detection (for social sharing)
* **Indexation** — noindex detection (warns if the post is accidentally excluded from Google)
* **Keyword analysis** — keyword in title, URL, introduction, body density, meta description

= Focus keyword analysis =

Set a focus keyword directly in the post editor. The plugin checks:

* Is the keyword in the page title?
* Is the keyword in the URL slug?
* Does the keyword appear in the first 100 words?
* What is the keyword density in the content? (target: 0.5–2.5%)
* Is the keyword in the meta description?

= Google SERP Preview =

See exactly how your post will appear in Google search results — title, URL, and meta description — with character count indicators for both the title (60 chars) and meta description (160 chars).

= How the SEO score works =

The score (0–100) is computed locally from all checks above:

* **80–100** — Good. Page is well-optimized.
* **50–79** — To improve. Some quick wins available.
* **0–49** — Weak. Needs significant improvements.

A color badge appears directly in the posts/pages list so you can audit your entire site at a glance.

= Features =

* **SEO score badge** in posts/pages list table (color-coded: green / orange / red).
* **Detailed checklist** in the post editor with prioritized issues and recommendations.
* **Focus keyword field** — enter your target keyword and get 5 dedicated checks.
* **Google SERP preview** — title, URL, description with live character counters.
* **Social image check** — detects missing Open Graph image for sharing.
* **Noindex warning** — alerts you if a post is accidentally set to noindex.
* **H1 in content detection** — warns when a post content has an H1 (incorrect hierarchy).
* **Dashboard page** with global stats and the 20 most recent posts with scores and issues.
* **Yoast SEO, RankMath & SEOPress compatible** — reads meta description and OG image automatically.
* **Zero external requests** — all analysis runs locally on your WordPress server.
* **Score caching** — results are cached in post meta and refreshed automatically on save.

= What this plugin does NOT do =

* No AI content generation.
* No external API calls.
* No account or license required.
* No tracking or analytics.
* No premium tier or locked features.

= External services =

This plugin makes **no external requests automatically**.

The dashboard page contains a static link to **Greenlog SEO Automation** (`https://suite.greenlog.fr`) — an optional, separate paid service for automated SEO content generation. Clicking this link is entirely voluntary. No data is sent to that service by this plugin.

== Installation ==

1. Upload the `greenlog-seo-tools` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Audit SEO** in the admin menu to see your dashboard.
4. Open any post or page and find the **Analyse SEO** meta box to see your score and checklist.

The SEO score badge appears immediately in the posts/pages list after activation.

== Frequently Asked Questions ==

= Does this plugin require an account? =
No. Activate and use — no account, no license, no registration.

= Does this plugin use AI? =
No. All SEO analysis is done locally with rule-based checks. No AI, no API keys.

= Does this plugin make external API calls? =
No. All processing happens on your WordPress server. Zero external requests.

= Is any data sent externally? =
No. The plugin only reads your local WordPress post content. Nothing is transmitted outside your server.

= Is it compatible with Yoast SEO, RankMath, and SEOPress? =
Yes. The plugin reads meta description and social image settings from Yoast SEO, RankMath, and SEOPress automatically. It does not modify or replace their data.

= What does the focus keyword feature do? =
Enter a target keyword in the post editor. The plugin checks if the keyword appears in the title, URL, first 100 words, meta description, and measures its density in the content.

= What is the SERP preview? =
It shows a mock Google search result — title, URL, and description — with character count indicators so you can see if your title or meta description will be truncated in search results.

= Will it slow down my site? =
No. Scores are cached as WordPress post meta and only recalculated when a post is updated. The plugin adds no frontend code — it runs exclusively in the WordPress admin.

= Does it work with Gutenberg (block editor)? =
Yes. The SEO checklist meta box works with both the Classic Editor and the Gutenberg block editor.

= Can I use it on multisite? =
Yes. The plugin works on WordPress multisite installations. Activate it network-wide or per-site.

= The score dropped after updating to 1.1.0 — is that normal? =
Yes. Version 1.1.0 adds new checks (H1, OG image, focus keyword) and fixes a scoring bug where a missing title did not lower the score. The new score is more accurate.

== Screenshots ==

1. Dashboard — global stats, comparison table Free vs Premium, and the 20 most recent posts with scores and issues.
2. Post editor — meta box with score, SERP preview, focus keyword field, and detailed SEO checklist.
3. Posts list — "Score SEO" column with color badge (Good / To improve / Weak).

== Upgrade Notice ==

= 1.2.0 =
New SEO dashboard with tabs, dedicated Opportunities page, score history & trend, dashboard widget, sortable score column, CSV export, and a welcome onboarding notice. No breaking changes.

= 1.1.0 =
Major update: focus keyword analysis, Google SERP preview, OG image check, noindex detection, H1 detection, score calculation fix. Scores may change due to new checks.

= 1.0.0 =
Initial release.

== Changelog ==

= 1.2.1 =
* Fix: assets are now loaded exclusively via `wp_enqueue_style()` / `wp_enqueue_script()` / `wp_add_inline_style()` (no more inline `<style>` tag printed on `wp_head`/`admin_head`).
* Fix: removed a translation call that used a variable instead of a literal string as the translatable text.
* Fix: internal option, transient, AJAX hook and nonce names now use the unique `greenlogst_` prefix instead of the too-short `gst_` prefix (with automatic migration of existing option values, no data loss).

= 1.2.0 =
* New: Redesigned SEO dashboard with tab navigation and a 4-level grade distribution (Excellent / Good / To improve / Critical).
* New: Dedicated "Opportunities" page listing analyzed posts with their problems, filterable by type, with one-click edit.
* New: Score history — previous score saved on each post save, with trend indicator (up / down / stable) in the list column and dashboard.
* New: WordPress dashboard widget with a compact SEO overview.
* New: Sortable "SEO Score" column in the posts and pages list.
* New: CSV export of all opportunities.
* New: Welcome notice after activation with a direct link to the SEO audit (auto-clears once the dashboard is opened).
* Improvement: Global stats are cached (transient, 1 h) and recomputed only on post save — no full scan on each page load.
* Improvement: Styled empty states on the dashboard and opportunities page.

= 1.1.0 =
* New: Focus keyword field in the post editor — checks keyword in title, URL, first paragraph, density, meta description.
* New: Google SERP preview in the post editor with character count indicators.
* New: Open Graph / social image check (Yoast SEO, RankMath, SEOPress, featured image).
* New: Noindex warning — alerts when a post is set to noindex.
* New: H1 in content detection.
* New: SEOPress meta description and OG image compatibility.
* Fix: Score calculation bug — missing title and empty content now correctly lower the score.
* Fix: Word count now uses Unicode-safe regex (handles French and other accented languages).
* Fix: `load_plugin_textdomain` for proper translation support.
* Improvement: "Tableau de bord" link added to plugin action links in the plugins list.
* Improvement: Comparison table Free vs Premium in the dashboard.
* Improvement: Updated readme.txt for WordPress.org search optimization.

= 1.0.0 =
* Initial release.

== Privacy ==

This plugin does **not** collect, store, or transmit any personal data to external services.

* All SEO analysis is performed locally on your server.
* No tracking, analytics, or telemetry of any kind.
* No external API calls are made automatically.
* Computed scores and analysis are cached locally as WordPress post meta (`_greenlog_seo_tools_score`, `_greenlog_seo_tools_analysis`) and are deleted when the plugin is uninstalled.
* The focus keyword is stored locally as post meta (`_greenlog_seo_focus_keyword`) and is deleted when the plugin is uninstalled.
* The dashboard page contains a static link to `https://suite.greenlog.fr`. This link is informational only. No data is sent to that service.

For questions: support@greenlog.fr
