=== RankGrain SEO ===
Contributors: rohitdangarone
Tags: seo, meta description, schema, sitemap, redirects
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight, easy all-in-one SEO for bloggers. Turn on only what you need. Developed by Rohit Dangar.

== Description ==

RankGrain SEO gives bloggers everything they need to rank, without the weight. Every feature is a module with an on/off switch, and a module that is off loads no code at all. Nothing is added to the public site except the tags you turn on: no front-end CSS or JavaScript, no jQuery, no external calls.

**Modules**

* **Title, keyword & meta box**: SEO title, meta description, focus + secondary keywords for every post and page, a live Google preview (desktop and mobile) with length bars, green/orange/red keyword checks and a 0–100 score, also shown as a column in your Posts list. Works in the block editor and the classic editor.
* **Content analysis**: word count, subheadings, keyword in H2/H3, sentence and paragraph length, internal/external link and image counts.
* **Internal link suggestions**: related posts from your own site with one-click copy.
* **Social previews**: Open Graph and X (Twitter) cards.
* **Schema**: Organization or Person, WebSite, Article/BlogPosting, Breadcrumb, and an FAQ block that adds FAQ rich results.
* **XML sitemap & robots.txt**: a clean sitemap of posts, pages and categories (hidden pages left out) and a simple robots.txt editor.
* **Breadcrumbs**: `[rankgrain_breadcrumbs]` shortcode or `rankgrain_breadcrumbs()` in your theme.
* **Redirects & 404 monitor**: 301/302/410 redirects, a log of missing pages with one-click redirect, optional automatic redirect of 404s.
* **Broken link checker**: checks the links in your posts in the background, a few at a time, with one-click fixes.
* **Image alt text checker**: finds images without alt text and fills them in bulk.
* **Site audit** (always on): a 0–100 score for the whole site with one-click fixes. Every fix can be undone.

Also: per-post noindex / nofollow / canonical, a 3-step setup wizard, and import of titles, descriptions and keywords from Yoast SEO and Rank Math.

**Works with Yoast SEO and Rank Math.** When one of them is active, RankGrain SEO writes into its fields and prints no meta tags of its own, so a page never gets two descriptions.

== Installation ==

1. Plugins → Add New → search for "RankGrain SEO", or Upload Plugin → choose `rankgrain-seo.zip` → Install → Activate.
2. The setup wizard opens: pick your site type, add your name and logo, choose modules.
3. Open **RankGrain SEO** in the admin menu and click **Scan my site**.

== Frequently Asked Questions ==

= Will it slow down my site? =
No. Modules that are off load no code. The public site gets only the tags you turned on. Scans and link checks run in the admin or in the background, in small batches.

= Will it change my site when I install it? =
No. Nothing changes until you click a Fix button or turn a module on.

= How do I undo a fix? =
Click Undo next to it, or open the Fix history tab.

= Does it send my data anywhere? =
No. RankGrain SEO has no tracking, no ads, no license checks and no paid version. It never contacts its author. The only outgoing requests are the ones you start or turn on: the site audit loads your own site's pages to check them, and the Broken link checker requests the links in your own posts to see if they still work. Private and local network addresses found in posts are never requested.

= I updated from 2.0.0. Is my data still there? =
Yes. Version 2.0.0 stored its data under an older internal name. On the first page load after the update, 2.0.1 moves it once: SEO titles, descriptions and keywords, settings, redirects, the 404 log, broken links and the fix history. Nothing needs to be done by hand.

= Does it work with the block editor and headless sites? =
Yes. The SEO box works in the block editor and the classic editor, and the SEO fields are available in the REST API for users who can edit the post.

= Does it work on multisite? =
Yes, it can be activated per site. Each site keeps its own settings and data, and deleting the plugin cleans every site.

= Can I use it together with Yoast SEO or Rank Math? =
Yes. When one of them is active, RankGrain SEO writes into its fields and prints no tags of its own, so a page never gets two descriptions.

== Screenshots ==

1. The SEO box in the editor: Google preview, keyword checks and the 0–100 score.
2. Site audit with one-click fixes.
3. Fix history with Undo.
4. Modules screen: turn on only what you need.
5. Redirects and 404 monitor.
6. Broken link checker.

== Changelog ==

= 2.0.3 =
* Security hardening for the WordPress.org review: every database table name is escaped, nonces are checked directly in each form and AJAX handler, and all request input is sanitized.
* Admin scripts are printed with WordPress's own script functions instead of raw script tags.
* Internal link suggestions no longer use a slow "exclude this post" query.
* Readme: the site audit's requests to your own site are now listed under "Does it send my data anywhere?".

= 2.0.2 =
* Fix: themes and code written for the 2.0.0 internal names work again. The old class, option and post meta names now read the RankGrain data (read-only; nothing is written under the old names). Themes that print their own meta description only when the plugin is missing no longer add a second one.
* Fix: saving the Modules screen changes only the switches you flipped. Other modules keep their state, even when the page was out of date.
* Safer upgrade: after the data has moved, a notice says the old copy of the plugin can be deleted. If it is deleted, anything still stored under the old names is moved over first; its uninstall only removes old copies and never touches RankGrain SEO data.

= 2.0.1 =
* Security: the Broken link checker no longer requests private, local or cloud-metadata addresses found in post content, and uses WordPress's safe HTTP functions for outside links.
* Security: the internal "link check" header now carries a per-site secret, so visitors cannot use it to hide from the 404 log.
* Faster: saving a post no longer loads the title and description of every post on the site to find duplicates. The full list is only built during a site audit.
* Faster: with a persistent object cache, 404 and redirect hit counts are added up and written once a minute instead of on every hit. Requests from vulnerability scanners and scripts with no browser name are no longer logged as 404s.
* Internal names renamed to rankgrain. Existing data (settings, post SEO fields, redirects, 404 log, broken links, fix history) is moved automatically on update.
* Uninstall now removes both old and new data, on every site of a multisite network.
* SEO fields are registered for the REST API (block editor and headless use), with edit permission checks.
* Suggested privacy policy text for the 404 monitor (Settings → Privacy).
* Translation and coding-standard fixes.

= 2.0.0 =
* All-in-one: modules with on/off switches.
* New editor box with focus + secondary keywords, Google preview, keyword checks, 0–100 score and a score column.
* New: content analysis, internal link suggestions, schema (Article, Breadcrumb, FAQ block), XML sitemap & robots.txt editor, breadcrumbs, redirects & 404 monitor, broken link checker, image alt checker, setup wizard, Yoast / Rank Math import.
* Per-post nofollow and canonical. Optional meta keywords tag (off by default).
* All existing settings and post data carry over unchanged.

= 1.0.1 =
* Renamed to RankGrain SEO. Developed by Rohit Dangar.

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 2.0.3 =
Security and coding-standard hardening. No settings change.
