=== SEOBot AI – SEO Automation, Content Optimizer & Internal Linking ===
Contributors: devilboss
Donate link: https://seobot-api.domnam.workers.dev/
Tags: seo, ai content, internal linking, keyword research, google search console
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.7.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

**AI-powered SEO automation for WordPress** — internal linking, content generation, keyword research, and rankings boost.

## Description

**SEOBot AI replaces 5+ SEO tools with one intelligent dashboard** that analyzes, optimizes, and grows your organic traffic on autopilot — saving you 10+ hours per week.

## 🚀 Why SEOBot AI?

- **All-in-one** — Internal linking, content generation, keyword research, E-E-A-T scoring, GSC analytics, backlink outreach, and more.
- **AI-powered, human-controlled** — Review and approve every suggestion before it goes live.
- **Safe by design** — Automatic backups before every change, with one-click restore and diff viewer.
- **Works with any theme or SEO plugin** — Yoast, Rank Math, All in One SEO, SEOPress, WooCommerce.

## ✨ Key Features

- 🔗 **Internal Linking** — AI-suggested contextual links with anchor text. Apply individually or in bulk.
- ✍️ **AI Article Creator** — Generate full SEO articles in 3 steps, with AI images, FAQs, and YouTube embeds.
- 📊 **Keyword Research** — Real search volume, CPC, and competition data via Google Ads API.
- 📈 **Google Search Console** — View performance and keyword opportunities without leaving WordPress.
- 📝 **Content Planner** — Plan and publish from keyword to post in minutes.
- 🏅 **E-E-A-T Scorer** — Score content against Google's quality guidelines with actionable fixes.
- 👥 **Author Optimizer** — Audit and AI-generate author bios to boost E-E-A-T.
- 📂 **Categories Optimizer** — Keep/delete/merge verdicts + auto-generated SEO descriptions.
- 🔄 **Cannibalization Detection** — Find competing posts and auto-set 301 redirects.
- 📅 **Smart Date Updater** — Automatically refresh outdated year references across all posts.
- ✏️ **Content Enrichment** — Score existing content (0–100) and apply AI improvements.
- 🔗 **Backlink Exchange** — Opt-in network for contextual backlinks with niche-matched sites.
- 💾 **Version History** — Full backup and restore for every AI change.

## 📦 Free vs. Premium

**Free:** Internal linking, content enrichment, duplicate detection, date updater, backups, activity log.

**Premium:** AI Article Creator, Google Search Console, keyword research, E-E-A-T scorer, Content Planner, Author & Category Optimizer, Backlink Exchange, priority support.

## 🌐 External Services

- **SEOBot AI API** — Handles all AI processing. Your site URL, name, admin email, and post content are sent for analysis. [Terms](https://seobot-api.domnam.workers.dev/terms) | [Privacy](https://seobot-api.domnam.workers.dev/privacy)
- **Google APIs** — Used for Search Console and keyword research via OAuth. [Terms](https://developers.google.com/terms) | [Privacy](https://policies.google.com/privacy)

## Installation

1. Go to **Plugins → Add New**, search **SEOBot AI**, install and activate.
2. Run the **Setup Wizard** — the plugin auto-registers and configures itself in under 2 minutes.
3. Optionally connect Google Ads (keyword research) and Google Search Console (analytics).

## Frequently Asked Questions

**Do I need an OpenAI key?**
No. All AI is handled through SEOBot AI's own API — no external keys needed.

**Will it break my content?**
Never. Every change is backed up automatically with a full restore option.

**Does it replace Yoast or Rank Math?**
No — it complements them. They handle meta tags and sitemaps; SEOBot AI handles content, linking, and optimization.

**Is the Backlink Exchange safe?**
Fully opt-in. You control niches, link types, and can remove all exchange links instantly.

**Is it GDPR compliant?**
Yes. No visitor data is collected. Only post content and site metadata are sent for AI processing. See our [Privacy Policy](https://seobot-api.domnam.workers.dev/privacy).

== Changelog ==

= 1.7.3 =
* New: "Connect to SEOBot admin" button in plugin Settings (and a nudge in the setup wizard) — uses the native WordPress Application Password consent screen, so the SEOBot AI server can open and edit your articles on demand without waiting for a cron run. The credential is stored encrypted (AES-GCM) on the server and revocable any time from Users → Profile → Application Passwords.
* New: “Live Posts” tab on each site in the admin dashboard — lists recent WordPress posts, opens them in a built-in WYSIWYG editor (titles, content, status), inserts links visually, and saves directly back to the live site through `/wp-json/wp/v2/posts`.
* Security: Stored Application Passwords are encrypted at rest with AES-GCM, scoped to a per-site key, never exposed back through the dashboard, and revocable from either side (admin disconnect or WP user profile).

= 1.7.2 =
* New: Multi-provider AI routing on the API server — the worker now picks OpenAI for `gpt-*` models and Anthropic for `claude-*` models automatically, with response shapes normalised so the plugin keeps using a single API surface.
* New: Per-plan AI models — administrators can assign a different model to Free, Starter, and Pro tiers; each site's plan determines which model handles its AI calls.
* New: Latest-generation models exposed (gpt-5.5, gpt-5, gpt-5-mini, gpt-5-nano, claude-opus-4.7, claude-sonnet-4.5, claude-haiku-4) alongside the existing GPT-4 lineup.
* New: Plugin lifecycle — when a plugin uninstall is reported (`Deleted`), the API server now disables the site, hard-removes its exchange profile, and deletes every backlink it had in the network.
* Fix: Settings save in the admin dashboard no longer returns the dreaded `Unexpected token '<', "<!DOCTYPE "... is not valid JSON` — the underlying D1 multi-line `exec()` call has been replaced with a prepared statement.

= 1.7.1 =
* New: AI output now follows the WordPress site language automatically — French, Spanish, German, Italian, Portuguese, Dutch, and 25+ other locales. E-E-A-T summaries, author optimisation suggestions, content tips, keyword ideas, and rewrites are all written in the site's language instead of always in English.
* New: Backlink Exchange — matched links from the network are now placed automatically right after a sync (no extra button click required), and a daily background cron syncs + places fresh matches every 24 hours when the site is opted in.
* New: Every auto-placed exchange link is recorded in the Activity Log under the "backlink" action key, including a per-run summary of how many links were inserted and across how many posts.
* Fix: Content Bot post-analysis tabs (Internal Links, Content, Dates, Keywords, E-E-A-T, Categories) now switch correctly — fixed a CSS class mismatch that left previously-shown panels visible behind the active tab.
* New: Each Content Bot analysis tab now displays a clear description of what the tab does and how to proceed before the action buttons.

= 1.7.0 =
* New: Deep activity tracking — every AJAX action, button click (incl. Upgrade / pricing CTAs), and admin page view is now recorded in the Activity Log with structured context.
* New: Activity Log adds a Details column with a collapsible context viewer and new filter chips (AJAX, Click, Upgrade CTA, Page View).
* Fix: Site state now stays in sync with the API server — uninstalling the plugin deactivates the site on the server, removes it from the backlink exchange, and resets monthly usage counters so a fresh re-install starts clean.
* Fix: Re-registration after uninstall no longer carries over stale request counters from a previous installation (resolves inflated "This Month" totals).
* Improvement: Lifecycle events are exempt from rate limiting so deactivation / uninstall is always reported.

= 1.6.9 =
* Improvement: Conversion-optimised upgrade screen — Free-plan gap bar highlights 7 locked modules, value strip shows key numbers (12 modules, 6 tools replaced, $200+ saved, $2.67/day for Pro).
* Improvement: Pro card now uses fire/amber accent palette and is positioned as the unlimited content machine with GPT-5, Opus, and premium images.
* Improvement: New 3-column Free vs Starter vs Pro comparison table replaces 2-column table.
* Improvement: New Pro Engine section with 4 benefit cards on a dark background.
* Improvement: Daily cost callout ($1/day Starter, $2.67/day Pro) added under each plan price.
* Improvement: Log entries continue to store generic activity messages with no personally identifiable details.

= 1.6.8 =
* Improvement: Rebuilt the upgrade screen around two compact single-site offers: Starter and Pro.
* Improvement: Clarified Starter as capped basic AI usage and Pro as unlimited flagship AI usage.
* Improvement: New plugin log entries now store generic activity messages with redacted detail summaries.
* Fix: Corrected Search Console error logging during OAuth token exchange.

= 1.6.7 =
* Improvement: Logs redesigned with card-style layout, icons, and model badges instead of a raw table.
* Improvement: Backlink exchange profile modal now shows structured cards instead of raw JSON.
* Improvement: Debug payloads accessible via Debug button only, reducing visual noise.

= 1.6.6 =
* Improvement: Enhanced log readability with user-friendly action labels and raw details.
* Improvement: Added configurable website snapshot sync interval in settings.
* Improvement: Improved sync scheduling reliability.

= 1.6.5 =
* Improvement: Added a richer website detail view in the admin dashboard.
* Improvement: Improved sync coverage for website data.
* Fix: Prevented placeholder local registrations from being created.

= 1.6.4 =
* Improvement: Removed Addons tab.

= 1.6.3 =
* Improvement: Add auto update.


= 1.6.2 =
* Improvement: Added the "Upgrade for more request" button next to all displayed "Monthly request limit exceeded." messages, including Users Optimizer and related analysis screens.
* Improvement: Unified monthly-limit upgrade CTA rendering across plain-text error areas.

= 1.6.0 =
* Feature: Terms of service acceptance and marketing preferences added to the Setup Wizard.
* Feature: Plugin activation, deactivation, and deletion events are now logged for better account management.
* Improvement: After completing the Setup Wizard, users are automatically redirected to the Content Bot.
* Improvement: AI model selection is now fully managed server-side for improved security and consistency.
* Improvement: Simplified the Settings page by removing advanced fields that don't require user configuration.
* Improvement: Backlink Exchange cleanup — the self-removal option has been moved to the admin dashboard.
* Improvement: Added a direct Upgrade button next to monthly limit exceeded errors for faster plan upgrades.
* Fix: New websites now receive the correct default usage allocation.
* Fix: Dashboard UI polish for button/icon alignment and posts table checkbox spacing.

= 1.5.0 =
* Feature: Quick Actions on the dashboard now links to every section of the plugin for faster navigation.
* Feature: Admin-level removal of sites from the Backlink Exchange network.
* Improvement: Updated premium plan descriptions with the latest available AI models.
* Improvement: Step-by-step workflow guides added to Categories Optimizer and Users Optimizer pages.
* Improvement: Toggle switches in the Content Bot now have better padding and hover states.
* Improvement: Status labels on the dashboard ("Enrolled", "Connected") now display correctly inside their cards.
* Fix: Resolved button icon alignment issues in the admin dashboard.
* Fix: Stat cards no longer overflow when displaying text-based status values.

= 1.4.0 =
* Feature: Choose your preferred AI model directly from the admin dashboard settings.
* Feature: Permanently remove a website from the Backlink Exchange network with one click.
* Feature: "Connect Search Console" button on the Keywords page for faster setup.
* Feature: API usage overview on the WordPress dashboard — see requests used and monthly limit at a glance.
* Improvement: Moved keyword research API configuration to the central admin dashboard for easier management.
* Improvement: Simplified usage tracking — only monthly limits are shown, removing redundant daily counters.
* Improvement: Consistent button and checkbox alignment across all admin pages.
* Fix: Resolved "No field to update" error when editing site limits in the admin dashboard.
* Fix: Corrected broken navigation links on the WordPress dashboard page.

= 1.3.0 =
* Feature: New "Content Bot" — merged post analysis and article creation into a single, unified tab for a smoother workflow.
* Feature: Setup Wizard is now mandatory — users are guided through setup before accessing any page.
* Feature: Automatic recovery when the connection to the server is lost — the plugin re-registers seamlessly in the background.
* Improvement: Simplified rate limits — removed daily counters, only monthly usage limits remain.
* Improvement: Usage indicator now reflects real-time values from the server instead of local defaults.
* Improvement: Connection errors are clearly displayed in the usage bar instead of showing misleading numbers.
* Fix: Resolved an issue where deleting a site from the backend would cause a persistent authentication error.

= 1.2.0 =
* Feature: Merged content planning and article creation into a single tab for a streamlined workflow.
* Improvement: Simplified article creation — one input, one button, advanced options collapsed by default.
* Improvement: Content ideas queue integrated directly below the article creator.
* Fix: Usage indicator now shows monthly usage instead of daily.
* Fix: Stale usage data cleared on every page load to reflect the latest limits.

= 1.1.8 =
* Improvement: Usage indicator now shows live request counts instead of static placeholder values.

= 1.1.7 =
* Fix: Resolved an issue where joining the Backlink Exchange could fail silently on certain configurations.

= 1.1.6 =
* Feature: Registration status indicator in the Backlink Exchange dashboard.
* Improvement: Fair exit procedure — opting out now gracefully neutralizes links instead of removing them.

= 1.1.5 =
* Feature: Usage overview added to all page headers.
* Improvement: Reorganized navigation for better ergonomics.
* Fix: Settings section display issue.
* Improvement: Simplified Backlink Exchange onboarding to one-click join.

= 1.1.4 =
* Improvement: Refreshed admin interface with modern design.
* Improvement: Settings reorganized into logical sections.
* Improvement: Enhanced dashboard with detailed site overview.

= 1.1.3 =
* Feature: Improved logging and data synchronization with central dashboard.

= 1.1.2 =
* Fix: Improved compatibility for installations from the plugin directory.

= 1.1.0 =
* Feature: Search Console integration for search performance insights.
* Feature: Content quality scoring with actionable recommendations.
* Feature: Content Planner for editorial calendar management.
* Feature: Author profile optimizer for improved credibility signals.
* Feature: Category audit and optimizer.
* Feature: Backlink Exchange network.
* Feature: Addons marketplace.
* Improvement: Updated AI model support.
* Improvement: Auto language detection in Setup Wizard.
* Improvement: Improved interface consistency and responsive design.
* Fix: Various stability improvements.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.6.6 =
Improved log clarity and configurable sync interval.

= 1.6.5 =
Improved website detail visibility and registration reliability.

= 1.6.4 =
Removed the Addons tab.

= 1.6.3 =
Add auto update.

= 1.6.2 =
Monthly request limit errors now consistently show an "Upgrade for more request" button for faster upgrades. Recommended for all users.

= 1.6.0 =
Setup Wizard consent flow, lifecycle tracking, Content Bot redirect, server-side model management, monthly-limit upgrade CTA, and UI polish. Recommended for all users.

= 1.5.0 =
Expanded Quick Actions, exchange management improvements, UI polish, and updated AI models on the Upgrade page. Recommended for all users.

= 1.4.0 =
New AI model selector, Backlink Exchange removal, Search Console quick-connect on Keywords page, API usage overview, and UI polish. Recommended for all users.

= 1.3.0 =
New Content Bot, mandatory Setup Wizard, automatic recovery on connection loss, and simplified monthly-only usage limits. Recommended for all users.

= 1.1.8 =
Live usage tracking in the admin header. Recommended update.

= 1.1.0 =
Major update with Search Console, content quality scoring, Content Planner, and Backlink Exchange. Recommended for all users.
