=== SEOBetter ===
Contributors: seobetter
Donate link: https://seobetter.com/
Tags: seo, ai, content generation, schema, search console
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 1.0.114
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered content generation optimized for Google AI Overviews, ChatGPT, Perplexity & Gemini, plus on-page SEO, schema and Search Console.

== Description ==

SEOBetter helps you create content that both Google and AI answer engines (Google AI Overviews, ChatGPT, Perplexity, Gemini) can cite. It pairs free on-site SEO tools with an optional cloud article-generation and research service.

The free edition works alongside Yoast, Rank Math, or All in One SEO and gives you:

* Bring your own AI key and generate up to 30 articles per site (lifetime) - free-tier keys are available from Gemini, Groq and Qwen, or use OpenAI, OpenRouter or Ollama; you pay the provider directly. No AI key? A built-in local engine generates on your own server, free
* A free Tavily research key (1,000 searches/month on their free plan) is required to generate articles - it is what gives every article real, verifiable reference links instead of unsourced AI text
* Three content types - blog post, how-to, and listicle - written in English and localized for 6 countries (US, UK, AU, CA, NZ, IE)
* A GEO (Generative Engine Optimization) score 0–100 and an SEOBetter content score for every post and page, with concrete, prioritized suggestions
* On-page SEO meta and JSON-LD structured data (Article, FAQ, Breadcrumb) output, synced to Yoast / Rank Math / AIOSEO / SEOPress when present
* Google Search Console connection for ranking and freshness data
* An internal-links orphan report and an age-based content-freshness inventory
* `llms.txt` support and an AI-crawler access audit to help AI answer engines find your best content
* Free stock images via Pexels (with an Openverse fallback)
* A technical-SEO auditor, readability and "AI pattern" checks, and a humanizer pass
* The admin interface is translated into 13 languages

The AI article generation, topic research, and some ranking features are powered by the SEOBetter cloud service at api.seobetter.com. This is a paid software-as-a-service; the plugin is the interface to it, and you can also use your own AI provider API key instead. A 7-day Pro trial is available, and after it ends the free tier described above remains fully usable. See the "External services" section below for exactly what data is sent, when, and to whom, with links to each service's terms and privacy policy.

Upgrading to Pro unlocks higher cloud generation quotas, the other 14 content types (17 in total), 29 languages, advanced schema types, and more, delivered by the cloud service. Pro is sold at https://seobetter.com/pricing and is not required to use the free features above.

== Installation ==

1. Install SEOBetter from the WordPress Plugins screen, or upload the `seobetter` folder to `/wp-content/plugins/`.
2. Activate the plugin through the "Plugins" menu in WordPress.
3. Open the SEOBetter menu in the admin sidebar and follow the setup wizard.
4. (Optional) Add your AI provider API key, or start the 7-day Pro trial, to use AI article generation and research.
5. (Optional) Connect Google Search Console from SEOBetter → Settings to import ranking data.

No external connection is made on activation or on normal page loads. The plugin contacts an external service only when you take an action that needs it - for example clicking Generate, connecting Search Console, or searching for an image.

== Frequently Asked Questions ==

= Is SEOBetter free? =
Yes. The GEO/SEO scoring, on-page meta, schema, technical audit, llms.txt, Search Console connection, image search, and the free-tier AI generation (with your own provider key) are free. The SEOBetter cloud generation and research are a paid service; a 7-day Pro trial lets you try them, and the free tier remains available afterward.

= Do I need a SEOBetter account to use the free features? =
No account is required for the on-page SEO, scoring, schema, sitemaps, audits, or image search. An account (and a trial or Pro plan, or your own AI provider key) is required only for cloud AI generation, research, and ranking features.

= Does it conflict with Yoast, Rank Math, or All in One SEO? =
No. SEOBetter is designed to work alongside existing SEO plugins and will sync its meta and schema to them when they are active.

= What data does SEOBetter send to external services? =
See the "External services" section below for a per-service breakdown of what is sent, when, and the relevant terms and privacy policies. Nothing is sent until you take an action that requires it.

= Is the 7-day Pro trial a time-locked download? =
No. The plugin code is never disabled. The trial and Pro entitlements are granted by the SEOBetter cloud service; when a trial ends, the cloud simply stops authorizing the Pro cloud features and the free tier continues to work.

= Where do I get support? =
Free support is available in the WordPress.org support forum for this plugin. Pro customers also get priority support - see https://seobetter.com/pricing .

== Screenshots ==

1. The SEOBetter dashboard with GEO and SEO scores.
2. The AI article generator with the GEO score and improvement suggestions.
3. On-page SEO and schema settings for a post, synced to your SEO plugin.
4. Google Search Console ranking and freshness data.

== External services ==

This plugin connects to several external services to provide its functionality. For each, we describe what the service is, what data is sent, and when. No external request is made on activation or on normal page loads - only in response to an action you take.

= SEOBetter Cloud API (api.seobetter.com) =
What it is: SEOBetter's own cloud service that performs AI article generation, topic research, places/local-business grounding, price verification, and license/trial validation.
What is sent: your generation inputs (topic, keywords, content type, language, country, and related prompt settings), your site URL, and your license key or trial token. For topic research, the keyword or seed topic.
When it is sent: only when you click Generate, request topic suggestions, or after you have entered a license key / started a trial (validation). No data is sent on activation or on normal page loads.
Optional places-data keys: if you save a Foursquare, HERE, or Google Places API key under Settings - Places Integrations, that key is included in generation and research requests so the SEOBetter Cloud API can query the matching places provider on your behalf to ground local-business content in real listings. Nothing is sent to those providers directly from your site. Each provider has its own terms and privacy policy: Foursquare https://foursquare.com/legal/terms and https://foursquare.com/legal/privacy - HERE https://legal.here.com/en-gb/terms and https://legal.here.com/en-gb/privacy - Google Maps Platform https://cloud.google.com/maps-platform/terms and https://policies.google.com/privacy
What is NOT sent: your WordPress admin password, password hashes, secret keys/salts, auth cookies, or your site visitors' personal data.
Provided by SEOBetter. Terms: https://seobetter.com/terms - Privacy: https://seobetter.com/privacy

= Your own AI provider - bring your own key (OpenRouter, OpenAI, Anthropic, Google Gemini, Groq, Moonshot AI (Kimi), Ollama, or a custom endpoint) =
What it is: instead of the SEOBetter Cloud API, you can enter your own API key for a third-party AI provider, and the plugin then calls that provider directly to generate article text. You choose the provider and paste the key in Settings; no third-party key is configured by default.
What is sent: your API key (only to the provider it belongs to) and your generation inputs (topic, keywords, content type, language, country, and the related prompt text).
When it is sent: only when you click Generate while a provider key is configured. Nothing is sent on activation or on normal page loads.
Each provider is an independent company with its own terms and privacy policy:
- OpenRouter (openrouter.ai): https://openrouter.ai/terms and https://openrouter.ai/privacy
- OpenAI (api.openai.com): https://openai.com/policies/terms-of-use/ and https://openai.com/policies/privacy-policy/
- Anthropic (api.anthropic.com): https://www.anthropic.com/legal/consumer-terms and https://www.anthropic.com/legal/privacy
- Google Gemini (generativelanguage.googleapis.com): https://ai.google.dev/gemini-api/terms and https://policies.google.com/privacy
- Groq (api.groq.com): https://groq.com/terms-of-use/ and https://groq.com/privacy-policy/
- Moonshot AI / Kimi (api.moonshot.ai): https://platform.moonshot.ai/docs/agreement/modeluse and https://platform.moonshot.ai/docs/agreement/userprivacy
- Ollama (a server you run yourself, local or self-hosted): requests go only to the endpoint URL you configure. https://ollama.com/
If you configure a custom OpenAI-compatible endpoint, requests go only to the URL you enter.

= Google Search Console / Google OAuth (accounts.google.com, oauth2.googleapis.com, www.googleapis.com) =
What it is: Google's Search Console API, used to import your site's search-ranking and impression data.
What is sent: the OAuth authorization you grant, and your verified site URL when querying ranking/impression data.
When it is sent: when you connect Search Console, and when you (or a sync you enabled) refresh ranking data.
Provided by Google LLC. Terms: https://policies.google.com/terms - Privacy: https://policies.google.com/privacy

= Pexels (api.pexels.com, images.pexels.com) =
What it is: Pexels' royalty-free stock-image API, used for in-editor image search.
What is sent: your image search query.
When it is sent: when you search for an image.
Provided by Pexels. Terms: https://www.pexels.com/terms-of-service/ - Privacy: https://www.pexels.com/privacy-policy/

= Openverse (api.openverse.org) =
What it is: the Openverse open-licensed media API, used for in-editor image search.
What is sent: your image search query.
When it is sent: when you search for an image.
Provided by Openverse (a WordPress.org project); its data handling is covered by the WordPress.org privacy policy. API docs: https://api.openverse.org/v1/ - Privacy: https://wordpress.org/about/privacy/

= OpenStreetMap / Nominatim (nominatim.openstreetmap.org) =
What it is: the OpenStreetMap Nominatim geocoding service, used to ground local-business content in real places.
What is sent: the location or place name you supply.
When it is sent: when you generate location-based content, or use the geocode button in a schema block, that requires geocoding.
Provided by the OpenStreetMap Foundation. Terms: https://operations.osmfoundation.org/policies/nominatim/ - Privacy: https://wiki.osmfoundation.org/wiki/Privacy_Policy

= Tavily (api.tavily.com) =
What it is: an AI web-search API used to gather authoritative sources and citations during article generation. Required for article generation on the Free tier (it powers the reference links in every article); you provide your own key, and Tavily's free plan includes 1,000 searches per month.
What is sent: your Tavily API key and the search query (your keyword and related citation terms).
When it is sent: only when you generate or optimize content and have configured a Tavily key.
Provided by Tavily. Terms & Privacy: https://tavily.com/

= DuckDuckGo (duckduckgo.com) =
What it is: DuckDuckGo web search, used as a no-key fallback to find supporting sources and citations during article generation.
What is sent: the search query derived from your topic and keyword.
When it is sent: only during content generation, and only when a keyed search provider (such as Tavily) is not configured.
Provided by DuckDuckGo. Terms: https://duckduckgo.com/terms - Privacy: https://duckduckgo.com/privacy

= Crossref (api.crossref.org) =
What it is: the Crossref scholarly metadata API, used to validate DOIs and citation metadata in academic/scholarly content.
What is sent: the DOI or citation identifier being validated.
When it is sent: only during generation of content that includes scholarly references.
Provided by Crossref. Terms: https://www.crossref.org/membership/terms/ - Privacy: https://www.crossref.org/operations-and-sustainability/privacy/

= Lorem Picsum (picsum.photos) =
What it is: a placeholder-image service, used as a last-resort image when no Pexels or Openverse result is available.
What is sent: only the requested image dimensions (no personal or site data).
When it is sent: only when a placeholder image is inserted during content generation.
Provided by Lorem Picsum. More info: https://picsum.photos/

= Bunny Stream (iframe.mediadelivery.net) =
What it is: the video host for SEOBetter's optional 3-minute intro video on the Settings screen.
What is sent: nothing on a normal page view - the player is click-to-load, so your browser only requests the video from Bunny Stream after you press play (a standard embedded-video request).
When it is sent: only when you press play on the intro video.
Provided by BunnyWay d.o.o. Terms: https://bunny.net/tos/ - Privacy: https://bunny.net/privacy/

= DeskCrew (deskcrew.io) =
What it is: DeskCrew hosts the SEOBetter product changelog. The plugin shows those changelog entries in the admin Announcements drawer.
What is sent: when you open a SEOBetter admin screen, the plugin makes a server-side request to deskcrew.io for the public changelog (a read-only JSON feed identified by a publishable key). The request carries no personal data. No browser script from deskcrew.io is loaded.
When it is sent: only while viewing a SEOBetter admin screen, and the result is cached for several hours. Nothing is sent on activation or on front-end page loads.
Provided by DeskCrew. Privacy: https://deskcrew.io/privacy

== Changelog ==

= 1.0.114 =
* The External services section of this readme now lists Moonshot AI (the Kimi provider added in 1.0.112) with links to its terms of service and privacy policy, and states that any optional places-data API keys you save in Settings are sent to the SEOBetter Cloud API so it can query those providers on your behalf. Documentation-only release; no code changes.

= 1.0.113 =
* Any number of AI providers can now be saved (one active at a time, switch whenever you like) - the previous one-provider limit is removed.
* Pasting a key that belongs to a different provider is now caught at save time with a message naming the mismatch, instead of being accepted and failing later during generation. Keys are checked against each provider's documented prefix.

= 1.0.112 =
* The internal paid-tier feature catalog is removed from the package entirely. It was never consulted by anything in this plugin, but its presence could read as license gating of local functionality; now the licensing code contains no feature map at all, and the one capability check always answers yes. License checks that remain gate only the hosted cloud service.
* AI provider catalog refreshed to the current model generation: Claude Opus 5 and Sonnet 5, GPT-5.6 Sol, Gemini 3.7 Flash, and a new Kimi (Moonshot AI) provider with the K3 and K2.6 models. Deprecated Groq Llama models removed per Groq's migration guidance, and every OpenRouter model id was re-verified against the live OpenRouter catalog. Provider defaults moved off deprecated models.

= 1.0.111 =
* Every JavaScript global the plugin creates now carries the seobetter prefix. The admin data objects are renamed (seobetterGenMain, seobetterGenCountry, seobetterDiag, seobetterGsc), the content-generator scripts run inside closed scopes instead of the page's global scope, and the few functions HTML attributes call are exported explicitly as seobetter-prefixed names. No behaviour changes; this removes any chance of a name collision with another plugin or theme.

= 1.0.110 =
* Free generation no longer stops with an upgrade message. When the prompt service declines a request, generation continues on the built-in local engine instead of aborting the article, and the message machinery behind that stop is removed from the package at build time. The Features screen lead line no longer implies any listed module is locked. The dashboard header carries no paid-tier button handling. Entering a purchased Pro key now shows the Download SEOBetter Pro button in the success notice - previously the notice described a download the page never showed. The translation template file is no longer bundled; wordpress.org builds language packs from the plugin source directly.
* Meta descriptions can no longer end mid-sentence. When the model writes past its length budget and trails off, the description is repaired to its last complete sentence, or to a clean word boundary with dangling connector words removed - the defensive treatment meta titles have had since 1.0.68.

= 1.0.109 =
* The free package now contains only what the free plan offers. Removed: the Brand Voice settings card, the Author Bio tab (its form was already absent), the AI-image-only branding fields (business name, description, things to avoid, provider and API key selectors, logo upload), the Pro+ upsell panels on the Internal Links, Freshness and Search Statistics screens, the locked rows on the Features screen, and the Bulk Generate links to a screen this package does not include. Brand colors, the image style preset and the article-title overlay stay - they drive the styling and featured-image composition on free stock images. Free generation runs on your own AI key; the settings screens no longer state a per-site article allowance.

= 1.0.107 =
* WordPress.org review compliance release. The free package no longer contains the features it does not offer, rather than disabling them. The content-type selector ships three types, the country selector six, and the language selector English only, with the handling for everything else removed at build time; the 29-language string tables, the Brand Voice field and the long-form word-count options go with them. The per-post freshness diagnostic and the internal-link suggestions panel are gone too, along with their editor sidebar panels, metabox tab and drawer, so no padlock badge, locked option or upgrade prompt for an absent feature remains on any screen, and no local licence check survives in the package. The exported HTML document no longer carries a style block. The branding logo preview is now built through the DOM API instead of string concatenation, so an uploaded file name containing a quote character can no longer inject markup into the Settings screen. All admin JavaScript now loads from enqueued .js files with server values passed through wp_localize_script instead of being assembled in PHP; that change surfaced and fixed a bug where two truncated script blocks stopped the Generate screen's JavaScript from running at all.

= 1.0.106 =
* WordPress.org review compliance release. Pro-only local features are now physically absent from the free package (removed at build time, not disabled by a license check): the AI Assistant block, the bulk generator, cannibalization and citation-tracker screens, and the llms-full.txt / multilingual llms.txt endpoints. All admin output is escaped at the point of output, output buffers open and close in the same scope, internal case-conversion constants are prefixed, and generated-article styling now loads via wp_enqueue_style instead of inline style blocks. The fal image provider is not part of the free plugin and its External services entry was removed. Selecting a content type no longer moves the word-count selector above the free 1,500-word limit; the recommended Pro length is shown as a hint instead.

= 1.0.105 =
* The free Tavily research key is now required to generate articles on the Free tier, and the setup wizard walks you through adding it. This closes the silent failure where articles generated with an AI key alone contained no reference links - references are what make articles rank and earn AI citations. Tavily's free plan (1,000 searches/month) covers 100+ articles.

= 1.0.104 =
* Compliance and security release for the WordPress.org review. Pro-only local features are no longer included in the free package (the internal-linking suggester engine, author bio Person schema, freshness diagnostic, AI featured-image providers, citation tracker, and the llms.txt Pro variants); the free orphan-pages report, basic llms.txt and Pexels images are unchanged. The plugin no longer deactivates other plugin copies. All admin scripts and styles now load through the WordPress enqueue APIs, output escaping and nonce coverage were tightened across the plugin, REST endpoints gained stricter capability checks, and the remote font download was removed. The Tavily key field is now available on the free tier, the intro video loads only when you press play, and the External services documentation was completed.

= 1.0.103 =
* WordPress Plugin Check compliance: switched to wp_strip_all_tags(), scoped the internal-link custom-table queries (prepared values, identifier-safe table names), and annotated a read-only admin-screen check.

= 1.0.102 =
* Free article generation is now bring-your-own-key: connect your own AI provider (Gemini, Groq and Qwen have free tiers, plus OpenAI, OpenRouter and Ollama) for up to 30 articles per site, or use the built-in local engine with no key. SEOBetter Cloud generation is now a Pro feature.
* Onboarding, dashboard and settings copy updated to match; assorted housekeeping.

= 1.0.35 =
* Maintenance release: WordPress Plugin Check compliance fixes and housekeeping.

= 1.0.0 =
* Initial WordPress.org release of the free SEOBetter edition.

== Upgrade Notice ==

= 1.0.102 =
Free article generation now runs on your own AI key (free-tier keys work) or the built-in local engine; hosted Cloud generation moves to Pro.

= 1.0.0 =
Initial free release of SEOBetter.
