=== HiveMind SEO ===
Contributors: codexistlabs
Tags: seo, ai, openrouter, gemini, on-page seo
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Stable tag: 1.54.1
License: Proprietary — All Rights Reserved
License URI: https://codexist.co.za/plugins/hivemind-seo/license

AI-powered on-page SEO analysis and meta management for WordPress, using your own OpenRouter, Groq, Cloudflare Workers AI, or Google Gemini key.

== Description ==

HiveMind SEO gives you real-time on-page analysis (title, description, keyword usage, readability, headings, links, image alt coverage) plus AI-assisted suggestions for titles, meta descriptions, image alt text, and content improvements — powered by whichever AI provider and model you choose — OpenRouter, Groq, Cloudflare Workers AI, or Google Gemini — including free models.

You can target more than one focus keyword or phrase per post: the first is treated as primary (driving the title, description, subheading, and URL checks) while every keyword gets its own content coverage check.

Built and maintained by Codexist Labs (https://codexist.co.za).

= Key Features =

* Real-time on-page SEO checklist as you write
* Multiple focus keywords/phrases per post, with primary + secondary coverage checks
* AI-suggested focus keywords based on actual page content
* AI-generated SEO titles & meta descriptions
* AI-suggested image alt text for accessibility and SEO
* AI content review with specific, actionable feedback
* Title, meta description, canonical, robots, Open Graph & Twitter Card output
* Content Overview page: every post/page/CPT in one sortable, filterable table with its SEO score and biggest issue at a glance
* Bulk AI title/description suggestions across many selected posts, with a review step before anything is applied
* Schema.org JSON-LD (Organization, LocalBusiness, Article, Product, FAQPage, BreadcrumbList) — LocalBusiness supports NAP, opening hours, geo coordinates, price range, and service area
* Live SERP preview — see how your title and description look in Google as you type
* AI: Suggest Internal Links — copy-ready anchor HTML for up to 5 relevant posts, ranked by shared category/tag relevance, not just recency
* SEO Export — full-site Excel (.xlsx) or CSV export covering keywords, headings, links, images, score, and more, with an optional AI content suggestions pass
* Excel (.xlsx) or CSV Import — bulk-update Focus Keyword, Key Phrase, SEO Title, Meta Description, and Canonical URL from a spreadsheet, matched by column name, with a review step before anything is written
* Choose your AI provider — OpenRouter, Groq, Cloudflare Workers AI, or Google Gemini — each with its own free tier
* Built-in conflict detection if another SEO plugin is also active
* Keyword Research (Pro) — bulk keyword lookups with related and question-based suggestions, plus saved keyword lists you can revisit and export to Excel. Works free out of the box via Google Autocomplete + your Search Console data, with optional paid providers (DataForSEO, SEMrush, Ahrefs, Moz) for estimated search volume, difficulty, and CPC
* Migrate from Yoast SEO or Rank Math (Pro) — one click detects existing SEO data from either plugin and brings SEO Title, Meta Description, Focus Keyword, Canonical URL, and No Index/No Follow into HiveMind SEO, with the same review-before-write flow as Import
* Find Orphaned Content (free) — a whole-site scan that builds an internal-link graph and flags every published post/page nothing else links to, surfaced as a sortable, filterable "Incoming Links" column on Content Overview, with a free "Suggest sources" tool proposing which existing posts to link from
* Role Manager — grant specific non-administrator roles access to specific HiveMind SEO areas (Content Overview, Redirects, Keyword Research, Export & Import, Settings, and more), one checkbox per role per feature. Nothing is granted until an administrator opts a role in; administrators always keep full access regardless of configuration
* llms.txt Editor (free) — serves a Markdown file at /llms.txt following the llmstxt.org convention, giving AI assistants and LLM-based tools a curated index of your site's key content. Auto-generated from your published pages and posts by default, or write your own; same editor UX as Robots.txt
* Keyword Research (Pro): "Deep Crawl (a–z)" opt-in a–z Autocomplete sweep for the free Google provider, and one-click "Assign to Post" from any saved keyword list straight to a post's focus keywords
* SEO Export: optional inclusion of draft, pending-review, and scheduled posts alongside published content
* Reports (Pro): a combined dashboard pulling in Google Search Console (clicks, impressions, position, top pages, and striking-distance keyword opportunities), your active keyword-data provider's most recent saved list, and this plugin's own on-page score/orphan data. Includes a branded printable/PDF export (via your browser's own Print dialog, no extra plugin dependency), an optional weekly or monthly scheduled email, and a Quick Wins Checklist of up to 10 prioritized next actions with a difficulty, time estimate, impact rating, and how-to guide for each
* Looker Studio connection (Pro): a read-only data API for a Looker Studio connector, exposing Search Console pages and queries plus each post's on-page score, focus keyword, and incoming links, secured by an API key you generate and can revoke from the Reports page

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install via Plugins → Add New → Upload Plugin.
2. Activate the plugin.
3. Go to HiveMind SEO → Settings, pick an AI provider, and add its API key (OpenRouter and Groq both offer free keys in seconds; Cloudflare needs an Account ID plus an API Token).
4. Open any post or page — the HiveMind SEO panel appears below the content editor.

== Frequently Asked Questions ==

= Which AI provider should I use? =

OpenRouter is the simplest to start with — one free key, and its `openrouter/free` auto-router picks a free model for you. Groq is noticeably faster and also has a genuine free tier, but a narrower model catalogue. Cloudflare Workers AI needs both an Account ID and an API Token rather than a single key, and is worth it mainly if you're already on Cloudflare. Google Gemini's free key takes about a minute to create at aistudio.google.com (no billing setup) and covers Flash/Flash-Lite models — Pro models and EEA/UK/Switzerland accounts require billing. You can switch providers at any time in Settings without losing the other providers' saved credentials.

= Do I need to pay for any of these? =

No. All four providers offer free-tier access: OpenRouter (rate-limited free models), Groq (a generous free request quota), Cloudflare Workers AI (a free usage allocation on its own infrastructure), and Google Gemini (free Flash/Flash-Lite access via a no-card AI Studio key — Pro models and EEA/UK/Switzerland accounts require billing). You can add billing later for higher limits or premium models — entirely optional.

= Can I target more than one keyword? =

Yes. Type a keyword or phrase into the Focus Keywords field and press Enter or comma to add it as a chip — add as many as you like. The first one is your primary keyword and drives the title/description/heading/URL checks; every keyword gets its own density and content-coverage row in the analysis below.

= Will this conflict with Yoast SEO or Rank Math? =

HiveMind SEO is designed to run standalone. If another SEO plugin is also active, you'll see a warning and HiveMind SEO automatically pauses its own front-end title/meta output to avoid duplicate tags.

= Where are my API credentials stored? =

In your site's options table, masked in the admin UI. For extra security, define `CELABS_SEO_OPENROUTER_API_KEY`, `CELABS_SEO_GROQ_API_KEY`, `CELABS_SEO_GEMINI_API_KEY`, or `CELABS_SEO_CLOUDFLARE_ACCOUNT_ID` / `CELABS_SEO_CLOUDFLARE_API_TOKEN` in `wp-config.php` instead — these override the database value for their provider.

= What happens to my data if I delete the plugin? =

By default, all HiveMind SEO data (settings and per-post SEO fields) is removed. You can tick "Keep all SEO data" under Settings → Data before deleting if you want to retain it.

= Does this work with Elementor or Bricks? =

Yes. Both store the actual page layout outside of the normal post content, so HiveMind SEO resolves the real rendered content for analysis and AI suggestions. Note that alt text suggestions on these pages must be applied manually inside the builder — see the in-editor notice for details.

== Changelog ==

= 1.54.1 =
* Fixed: Content Overview bulk noindex could fail to redirect on some hosts.
* Fixed: wrong counts and icons in the post editor SEO checklist.
* Fixed: exported spreadsheets could run formulas from post titles. Cells are now neutralised.

= 1.54.0 =
* Added: Term SEO page with a table of all categories, tags and taxonomy terms, filters, and bulk edit (noindex, nofollow, set or clear SEO title and description).
* Added (Pro): export and import term SEO data as CSV or XLSX, with a review step before anything is written.
* Added (Pro): migrate category, tag and taxonomy SEO data from Yoast SEO and Rank Math.
* Fixed: a JavaScript error on form submits outside the Settings page.

= 1.53.0 =
* Added: default title and description templates for the blog home, author, date and post type archives, search results and the 404 page.
* Added: search results and the 404 page are noindex automatically (can be turned off in Settings).
* Added: category, tag and other taxonomy archives in the XML sitemap. Empty and noindexed terms are left out.

= 1.52.0 =
* Added (Pro): social title, description and image per category, tag and taxonomy term, with a live preview.
* Added (Pro): focus keywords with a live SEO score and checks on term screens, plus AI title and description suggestions.

= 1.51.0 =
* Added: SEO fields for categories, tags, product categories and any custom taxonomy: SEO title and description (with dynamic tags), noindex/nofollow, and a canonical URL, right on the term's add and edit screen. Set defaults per taxonomy under Settings, Titles & Meta.
* Added: full front-end output on category, tag and taxonomy archives (title tag, meta description, robots, canonical, Open Graph).
* Fixed: a WooCommerce category or tag SEO title now reaches the browser title tag, not only social previews.

= 1.50.0 =
* Added: dynamic tags. Use placeholders such as {{post_title}}, {{site_title}}, {{separator}}, {{terms:category}} and {{cf:my_field}} in the SEO Title and Meta Description, or set a default template per post type under Settings, Titles & Meta. An "Insert tag" picker and a live preview are built into the post editor. Rank Math (%title%) and Yoast (%%title%%) style tokens are understood too.
* Fixed: legacy tokens such as %date% were being damaged when a title or description was saved. The front-end title tag is now also escaped.

= 1.49.0 =
* Added: Looker Studio data API (Pro). A read-only REST endpoint a Looker Studio connector can pull Search Console pages and queries, plus per-post on-page data, from. Generate, replace, or revoke its API key from the new "Looker Studio Connection" card at the bottom of the Reports page. The key is shown once and only a hash is stored. The connector script itself follows in a later release.

= 1.48.1 =
* Fixed: a fatal error on activation caused by four plugin files being missing from the packaged zip (this affected v1.47.0 and v1.48.0). No plugin logic changed; this release restores the missing files.

= 1.48.0 =
* Added: Quick Wins Checklist at the end of the Reports page (dashboard, PDF, and email). A prioritized, up to 10-item list of concrete next actions built from the report's own data, each with a difficulty, time estimate, and impact rating. Click any item on the dashboard for a step-by-step how-to guide.

= 1.47.0 =
* Added: Reports (Pro): a combined dashboard pulling in Google Search Console (clicks, impressions, position, Top Performing Pages, and a new "Striking Distance Opportunities" list), your active keyword-data provider's most recent saved Keyword Research list, and this plugin's own on-page score/orphan data, all in one place.
* Added: "Download PDF" on the Reports page. Opens a clean, branded printable page; use your browser's Print dialog and choose Save as PDF. No new plugin dependency.
* Added: optional weekly or monthly scheduled email report (WP-Cron), plus a "Send Test Email Now" button.

= 1.45.0 =
* Added: Site Scanner (internal use only, codexist.co.za) — a public `[celabs_seo_site_scanner]` shortcode that lets a visitor scan any URL for a free, instant, rule-based SEO score. Entering an email unlocks the full check-by-check report plus a free AI fix-it prompt (templated, no AI API call). This feature is domain-gated and stays completely inert on every site other than codexist.co.za, including yours.
* Added: "Run in Background" button on Content Overview, next to "Run Across Entire Site" — hands the same whole-site AI queue to a WP-Cron-driven background job instead of the browser tab's own loop, so it survives closing the tab, sleep, or a dropped connection. Reopening Content Overview resumes watching progress. For modes with a review step (AI Title & Description, AI Focus Keywords), a finished job queues its results for review exactly like a live run rather than auto-applying anything.

= 1.44.0 =
* Added: Keyword Research "Deep Crawl (a–z)" — an opt-in, on-demand button that runs 26 extra Google Autocomplete calls (seed keyword + each letter a–z) to surface more long-tail ideas, available with the free Google provider.
* Added: "Assign to Post" on saved Keyword Research list items — search your posts by title and add the keyword to that post's focus keywords in one click, without overwriting anything already set.
* Added: SEO Export can now optionally include draft, pending-review, and scheduled posts alongside published content, via a new checkbox — published-only remains the default.

= 1.43.0 =
* Added: llms.txt Editor (free) — a new admin page serves a Markdown file at /llms.txt following the emerging llms.txt convention (llmstxt.org), giving AI assistants and LLM-based tools a curated index of your site instead of forcing a full HTML crawl. Auto-generates a default from your published pages and posts (reusing the same "which post types are public" setting as the XML Sitemap), or write your own — same editor experience as the existing Robots.txt Editor, including live preview and physical-file detection.

= 1.42.0 =
* Added: "AI: Suggest Internal Links" now ranks candidates by shared category/tag relevance with the source post instead of recency alone — categories weigh more than tags, with a recency-based backfill when a post's terms don't turn up enough matches. A post with no terms set falls back to the previous recency-only behaviour exactly.
* Added: a free "Suggest sources" button next to every "Orphaned" badge on Content Overview's Incoming Links column, powered by the same relevance ranking — proposes existing posts you could reasonably link the orphaned post from, with a "Copy Link HTML" action per suggestion to paste into whichever post you choose to edit. No AI credits used, no Pro requirement.
* Added: LocalBusiness schema. Settings → Schema.org has a new "Local Business" section — enable it, choose a business type (LocalBusiness or a more specific subtype like Restaurant, Dentist, Plumber, and others), and fill in whichever of name, phone, price range, address, geo coordinates, opening hours, and service area apply. Output site-wide alongside Organization, requires a license the same as the rest of Schema.org output.

= 1.41.0 =
* Added: "Remove Legacy SEO Data" on the Export & Import page — permanently deletes another SEO plugin's own postmeta (Yoast SEO, Rank Math, SEOPress, or legacy All in One SEO) from your database, for sites that migrated into HiveMind SEO or that removed the other plugin but still see its data detected. Deleting Yoast's own database tables does not remove its classic postmeta fields — this does. Irreversible, so it requires a typed confirmation phrase in addition to the usual permission checks; a help modal explains exactly what's affected. All in One SEO v4+ stores most data in its own tables rather than postmeta, so that option only clears legacy leftovers, not a v4 install's real data — noted directly in the UI.

= 1.40.1 =
* Fixed: "Load Top Queries" in the post editor's Search Performance panel required a full site administrator, even though it only ever shows data for the post you're currently editing. Non-admin editors and authors now see their own posts' Search Console data the same way they can already edit the post itself.

= 1.40.0 =
* Added: Role Manager — grant specific non-administrator roles (Editor, Author, Shop Manager, any custom role) access to specific HiveMind SEO areas: Dashboard, Content Overview, Redirects & 404, Keyword Research, Export & Import, Settings, Shortcodes, Consent Log, System Check, Robots.txt, and License. Every HiveMind SEO page previously required a real site administrator with no way to delegate any of it. Secure by default: every role starts with zero access, and upgrading changes nothing for existing non-admin users until an administrator explicitly grants a feature. Administrators always keep full access no matter what's configured, so it can't be used to lock yourself out. The new Role Manager screen itself is administrator-only and can't be delegated, so a role you grant elsewhere can never grant itself more.

= 1.39.0 =
* Added: Keyword Research now supports multiple keyword-data providers behind a new pluggable interface — choose SEMrush, DataForSEO, Ahrefs, or Moz under Settings → Integrations, with a "Test Connection" check for each. The active provider powers keyword overview metrics (volume/difficulty/CPC/competition), related keywords, and question-based suggestions everywhere they're used (Keyword Research page and the post editor meta box). Note: the DataForSEO integration has been checked against its published API; the Ahrefs and Moz integrations are built from their public API documentation but not yet verified against a live account — if you use either, please confirm results look correct and let us know if you hit any errors so we can adjust the endpoint details.
* Added: Keyword Research now also works with no API key, no account, and no cost. A new "Google (Free)" provider — now the default — pulls keyword ideas and question suggestions from Google Autocomplete (the same source behind the search box dropdown, with no usage quota), and, if you've connected Google Search Console, shows real first-party performance data alongside them: impressions, clicks, CTR, and average position for keywords your site actually appears for.
* Changed: the default keyword provider is now Google (Free) instead of SEMrush, so a fresh install has working keyword research immediately rather than requiring a paid API account first. Existing sites keep whatever provider they already selected.
* Changed: the free provider reports Search Console impressions in place of estimated search volume, and the results table relabels the column to "Impressions" to match. Keyword difficulty and CPC show as "—" under this provider — no free source provides them legitimately, so they are left blank rather than guessed at. A keyword showing 0 impressions means your site doesn't rank for it yet, not that nobody searches for it.
* Fixed: corrected misleading SEMrush setup text that claimed "any paid plan includes API access". SEMrush API access is a separate paid add-on that a standard Pro or Guru subscription does not include — the most common reason a valid-looking SEMrush key fails every call. The settings screen now says so explicitly and points to the free provider instead.



Older releases (1.38.0 and earlier) are documented in CHANGELOG-archive.md in the plugin folder.

