=== SEO Magic – AI SEO Assistant ===
Contributors: mairaforesto
Tags: seo, ai, metadata, image seo, woocommerce
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.7.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate SEO metadata, image alt text and AI-assisted content with Google Gemini directly inside WordPress.

== Description ==

SEO Magic brings practical AI-assisted SEO workflows into the WordPress dashboard. Generate suggestions, review them, edit anything you need and save only what you approve.

Use your own Google Gemini API key to work with posts, pages, products, media, taxonomies and author archives from one interface.

= What you can do with SEO Magic Free =

**Bulk SEO metadata**

* Review SEO coverage from a paginated admin table.
* Generate or edit SEO titles and meta descriptions.
* Manage Facebook / Open Graph and Twitter metadata.
* Work with posts, pages, products, public post types and archive metadata.
* Process items sequentially to reduce server load.

**Multimedia SEO**

* Find images with missing titles, alt text, captions or descriptions.
* Generate all image fields from one contextual action.
* Regenerate existing metadata while sending the current values so the AI can propose an alternative.
* Edit or generate individual fields.

**Content Assistant**

* Load an existing post or page into a focused editing workspace.
* Improve structure, readability, headings and introductions.
* Review desktop and mobile snippet previews.
* Edit SEO and social metadata without leaving the assistant.
* Preserve protected blocks, embeds, tables and shortcodes more safely.

**Autopilot**

* Fill selected missing metadata and image fields in the background with WordPress Cron.
* Choose the content types, schedule and fields to process.
* Preserve existing values unless regeneration is requested.

**Built for larger sites**

* Real database pagination avoids loading an entire product catalog into memory.
* Server locks and cross-tab coordination reduce overlapping requests.
* Structured errors clarify quota, timeout and connection problems.

= SEO plugin compatibility =

SEO Magic supports Yoast SEO, Rank Math and All in One SEO. Select the provider you use. If multiple providers are active and no safe choice exists, SEO Magic warns you instead of writing to an arbitrary provider.

= Optional SEO Magic Pro Add-on =

The separate Pro add-on adds:

* **WooCommerce Assistant:** product titles, long/short descriptions and tags.
* **Smart Schema and FAQ tools:** create and review structured-data drafts.
* **Auto-Linking Assistant:** discover relevant internal and external link opportunities.
* **Backlink Risk Signals:** group referring domains and review evidence.
* **Site Health Audit:** content signals, PageSpeed data and technical checks.
* **Advanced settings:** Google integrations, selected ACF context and model rules.

Learn more at https://seomagic.click/ and view the documentation at https://seomagic.click/documentation/.

= You stay in control =

Manual editors keep suggestions editable until you save them. Autopilot runs only when enabled and follows your selected content types and fields.

A Google Gemini API key is required for AI generation. API availability, limits and pricing are controlled by Google and may change.

== Installation ==

1. Install **SEO Magic – AI SEO Assistant** from the WordPress Plugins screen, or upload the `seo-magico` folder to `/wp-content/plugins/`.
2. Activate the plugin.
3. Open **SEO Magic → Settings**.
4. Add your Google Gemini API key and choose the settings you want to use.
5. Select your active SEO provider when applicable.
6. Open **Metadata SEO**, **Multimedia SEO** or **Content Assistant** and review your first suggestion.

For the optional Pro features, install and activate the separate SEO Magic Pro Add-on, then enter your Pro license under **SEO Magic → License**.

== Frequently Asked Questions ==

= Do I need a Google Gemini API key? =

Yes. SEO Magic uses your own Gemini API key for AI-assisted generation. The plugin does not sell or include Gemini usage.

= Is Google Gemini free? =

Google may offer free and paid tiers. Limits and pricing are managed by Google.

= Does SEO Magic replace my SEO plugin? =

SEO Magic writes supported metadata for the provider selected in settings. Avoid multiple SEO plugins managing the same fields.

= Does the AI analyze the actual image pixels? =

Yes. Image metadata generation reads the attachment and sends image data, plus available WordPress context, through the SEO Magic proxy to Gemini. Large images may be resized or compressed before transmission.

= What is the difference between Generate and Regenerate? =

Empty fields use Generate; existing metadata uses Regenerate and sends the current values. Identical suggestions are reported without a second automatic request.

= Can I use SEO Magic on a large WooCommerce catalog? =

Yes. Admin lists use real pagination and AI bulk operations run sequentially. Hosting and API limits still affect speed.

= What happens when I deactivate or update the plugin? =

Deactivation, updates and ZIP replacement preserve settings and generated metadata. Cleanup runs only on uninstall after explicit opt-in.

= How does the Pro license work? =

Free needs no license. Pro validates its key and site activation with the SEO Magic license server.

= Where can I get support? =

Use WordPress.org support for Free. Pro support is handled through https://seomagic.click/.

== Screenshots ==

1. SEO Magic dashboard with coverage summaries and quick access to the main tools.
2. Metadata SEO table with coverage indicators, filters and the metadata editor.
3. Content Assistant with editable content, snippet previews and SEO fields.
4. Multimedia SEO with missing-field indicators and contextual Generate / Regenerate actions.
5. WooCommerce product editor with Pro AI actions for product content.
6. Auto-Linking Assistant with internal and external link suggestions.
7. Backlink Risk Signals with grouped domains, evidence and recommendations.
8. Site Health Audit with content priorities and technical SEO information.

== Changelog ==

= 1.7.0 =

* Consolidated the stability, scalability and interface improvements introduced across the 1.6.x releases.
* Added server-side AI locks, cross-tab coordination, double-click protection and structured HTTP errors to reduce overlapping requests and duplicate AI usage.
* Added real database pagination for larger post and product catalogs.
* Improved Generate / Regenerate workflows for posts, archives and media, including comparison against the existing metadata.
* Fixed immediate saving and coverage refresh for generated taxonomy, tag and author archive metadata.
* Preserved settings and generated metadata during deactivation, updates and ZIP replacement; uninstall cleanup is now explicit opt-in.
* Refined Metadata, Multimedia, Content Assistant, WooCommerce and Site Health admin layouts and actions.
* Improved AIOSEO Lite / Pro detection and safer handling when multiple SEO providers are active.

For the complete version history, see `changelog.txt` included with the plugin.

== Upgrade Notice ==

= 1.7.0 =

Major stability and workflow update. Settings and generated metadata are preserved during the update.

== External Services & Privacy ==

SEO Magic uses external services only for features that require them. Review and configure these integrations before use.

= SEO Magic AI proxy and Google Gemini =

Some AI workflows use SEO Magic-operated Cloudflare Worker proxies before reaching Google Gemini; others may contact Gemini directly.

Requests may include:

* Your Gemini API key.
* The selected Gemini model and task type.
* Relevant content, media text and image data when image analysis is requested.
* Existing metadata, language and instructions.

WordPress passwords and database credentials are not sent. Google and Cloudflare process data under their own terms.

Google Gemini API terms: https://ai.google.dev/gemini-api/terms
Google Privacy Policy: https://policies.google.com/privacy
Cloudflare Privacy Policy: https://www.cloudflare.com/privacypolicy/

= Google services used by optional Pro features =

Optional Pro features may use:

* **PageSpeed Insights:** your site URL for performance data.
* **Programmable Search:** queries derived from analyzed content.
* **Search Console:** OAuth and authorized backlink-related data.
* **Safe Browsing:** selected URLs or domains for risk checks.

Google API Terms of Service: https://developers.google.com/terms
Google Privacy Policy: https://policies.google.com/privacy

= SEO Magic license server (Pro) =

Pro sends the license key, site URL and basic version information for activation and status checks.

= Optional deactivation feedback =

On deactivation, submitted feedback (reason, details, site URL and software versions) is stored locally and emailed to the author. Skipping sends nothing.

== Privacy Notice ==

Site owners must configure external services lawfully and update their privacy notices. Providers process requests under their own terms.
