AI SEO AutoFix (GSC + Yoast Compatible)
AI SEO AutoFix is a WordPress plugin that detects SEO issues, records them in a structured issue log, recommends fixes, and can apply selected changes directly inside WordPress. The plugin combines Google Search Console, PageSpeed Insights, optional AI providers, Yoast-aware metadata handling, and a rollback-capable fix engine.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mhkxx2/aiseo/archive/refs/heads/master.zipAI SEO AutoFix
AI SEO AutoFix is a WordPress plugin that detects SEO issues, records them in a structured issue log, recommends fixes, and can apply selected changes directly inside WordPress. The plugin combines Google Search Console, PageSpeed Insights, optional AI providers, Yoast-aware metadata handling, and a rollback-capable fix engine.
Executive Summary
This codebase is built as a modular SEO operations plugin rather than a simple settings add-on. It has four clear layers:
- Data collection from Google Search Console, PageSpeed Insights, WordPress content, and robots.txt.
- Issue detection and classification inside a dedicated issue engine.
- Fix generation and application through a controlled fix engine.
- Admin review, approval, rollback, and reporting through a custom WordPress admin UI.
The overall design is strong for a production plugin because it separates detection, storage, UI, and fix execution into distinct classes, and it stores rollback data for supported changes.
Core Capabilities
- Connects to Google Search Console with OAuth and stores available properties.
- Inspects URLs and classifies indexing and coverage problems from GSC.
- Pulls Search Analytics data to identify striking-distance queries, low CTR opportunities, content gaps, and content decay signals.
- Detects sitemap errors, robots.txt conflicts, orphan pages, missing metadata, missing schema, and Core Web Vitals issues.
- Supports AI-assisted issue analysis with OpenAI or Gemini.
- Applies supported fixes such as redirects, canonical overrides, robots changes, metadata updates, intro updates, content expansion, schema insertion, and image alt updates.
- Stores fix payloads and rollback metadata in custom database tables.
- Integrates with Yoast SEO when available.
- Schedules recurring audits with WP-Cron.
- Includes a GitHub-based updater for release delivery.
What The Plugin Detects
Based on the current implementation, the plugin can surface issues and opportunities in areas such as:
- GSC indexing and coverage states, including accidental
noindex, canonical mismatches, alternate canonical cases, redirects, 404s, soft 404s, and discovered or crawled but not indexed URLs. - Sitemap fetch or sitemap submit failures.
- Robots.txt blocking conflicts.
- Missing or weak SEO title and meta description data.
- Missing structured data for articles, FAQs, products, and local business pages.
- Orphan pages with no detected internal inbound links.
- PageSpeed-based LCP and CLS warnings.
- Growth signals including striking-distance keywords, low CTR pages, content gaps, and content decay.
- Security-oriented signals such as suspicious hacked URL spikes.
Fixes Supported By The Engine
The fix engine currently contains handlers for:
REDIRECT_301CANONICAL_OVERRIDENOINDEX_TO_INDEXINDEX_TO_NOINDEXMETA_TAG_UPDATEINTRO_UPDATESHORT_DESC_UPDATECONTENT_EXPANSIONSCHEMA_JSONLDSCHEMA_PRODUCTSCHEMA_LOCALBIZIMAGE_ALT_UPDATE- Internal link updates for redirect cleanup
Rollback support is implemented for the major content and metadata-changing fix types.
Architecture Overview
| Module | Responsibility |
|---|---|
ai-seo-autofix.php |
Plugin bootstrap, constants, autoload check, class loading, hooks |
includes/class-plugin.php |
Main service container and plugin lifecycle |
includes/class-admin-ui.php |
Admin pages, actions, notices, forms, AJAX handlers |
includes/class-db.php |
Custom tables and issue/fix persistence |
includes/class-gsc-client.php |
Google Search Console OAuth and API calls |
includes/class-issue-engine.php |
Detection pipelines, issue classification, AI analysis, fix proposal flow |
includes/class-fix-engine.php |
Safe fix execution, redirect handling, rollback logic |
includes/class-llm-client.php |
OpenAI and Gemini request handling and prompt helpers |
includes/class-yoast-integration.php |
Yoast canonical, robots, schema, and meta compatibility |
includes/class-robots-checker.php |
Robots.txt fetch, parse, and block detection |
includes/class-scheduler.php |
WP-Cron registration and recurring jobs |
includes/class-updater.php |
GitHub release update integration |
uninstall.php |
Conditional cleanup of tables, options, transients, and plugin meta |
Admin Areas
The plugin registers a dedicated admin menu with these sections:
- Dashboard
- Issues
- Fix Log
- Growth
- Settings
It also adds a WordPress dashboard widget for quick SEO health visibility.
Scheduled Workflows
The scheduler registers two recurring jobs, both targeted for 3:00 AM WordPress site time.
Daily Pipeline
The daily pipeline currently runs:
- GSC issue detection
- 404 redirect suggestion generation
- Schema detection
- Missing metadata detection
- Orphan page detection
- Core Web Vitals detection
- Daily AI analysis and optional fix proposal/application
- Sitemap submission
Weekly Pipeline
The weekly pipeline currently runs:
- Striking-distance and growth opportunity detection from GSC performance data
Requirements
- WordPress
6.0+ - PHP
7.4+ - Administrator access for configuration and approval workflows
- Google Search Console OAuth credentials for GSC-powered features
- OpenAI or Gemini API key for AI-assisted analysis and content suggestions
- Google PageSpeed Insights API key for CWV checks
Optional ecosystem dependencies:
- Yoast SEO for deeper metadata, canonical, robots, redirect, and schema interoperability
- WooCommerce for richer product schema generation
Installation
- Copy the plugin into
wp-content/plugins/ai-seo-autofix. - Activate the plugin from WordPress Admin.
- On activation, the plugin creates its custom tables and schedules its recurring jobs.
- Open
AI SEO AutoFix -> Settingsand complete the required configuration.
Initial Configuration
1. Google Search Console
To enable GSC-based auditing:
- Create OAuth credentials in Google Cloud.
- Use the plugin's redirect URL in your Google Cloud OAuth setup:
https://your-site.com/wp-admin/admin-post.php?action=aiseo_gsc_oauth - Enter
Client ID,Client Secret, andRedirect URIin plugin settings. - Connect Google Search Console.
- Fetch properties.
- Select the primary property to audit.
Note: sitemap submission requires GSC write scope, not only read scope.
2. AI Provider
To enable AI-assisted analysis:
- Choose
OpenAIorGemini. - Add the matching API key.
- Run the built-in AI test from the Settings screen.
- Optionally enable
AI Auto-Applyif you want AI-generated fixes to be applied automatically when valid.
3. PageSpeed Insights
Add a PageSpeed API Key if you want the plugin to run LCP and CLS checks.
4. Data And Privacy
The plugin intentionally gates all network activity behind a setting:
Allow External API Callsmust be enabled for GSC, PageSpeed, AI providers, and update checks.
This is important because many workflows will remain inactive until outbound requests are allowed.
5. Schema Settings
The plugin includes schema configuration for:
- Product schema
- LocalBusiness schema
For local business output, the plugin can use:
- Business name
- Phone
- Street
- City
- Region
- Postal code
- Country code
- Opening hours
- Price range
- Latitude and longitude
- Contact page slug
Safety Model
The plugin is designed with a conservative fix model:
- Safe fixes are separated from broader AI-generated recommendations.
- Fixes are stored before application instead of being applied invisibly.
- Rollback payloads are saved for supported changes.
- Alternate canonical auto-redirects are limited to safe variant patterns such as AMP, mobile, and tracking URLs, while excluding pagination and filter URLs.
- Yoast integration can be toggled on or off.
- External requests are opt-in.
- Uninstall cleanup is opt-in.
Database Footprint
On activation, the plugin creates these tables:
wp_aiseo_gsc_propertieswp_aiseo_snapshotswp_aiseo_issueswp_aiseo_fixeswp_aiseo_settings
The exact prefix depends on the site's WordPress table prefix.
The uninstall routine can also remove legacy or extended plugin tables if they exist, such as keyword and SERP-tracking tables.
Data Lifecycle
- Issues are stored with severity, URL, evidence JSON, recommended fix type, and status.
- Fixes are stored with action JSON, rollback JSON, status, timestamps, and error details.
- Post-level metadata is used for runtime overrides such as custom SEO title, meta description, and schema JSON-LD.
- If
Delete Data on Uninstallis enabled, the plugin removes its tables, options, transients, cron hooks, and_aiseo_*post meta during uninstall.
Yoast SEO Compatibility
When Yoast is active, the plugin can:
- Override canonical output
- Override robots directives
- Read and update Yoast title, meta description, and focus keyword values
- Inject schema nodes into Yoast's schema graph
- Attempt redirect manager integration where available
If Yoast is not active, the plugin can still render its own description and schema output on singular content.
Repository Structure
ai-seo-autofix/
|-- ai-seo-autofix.php
|-- uninstall.php
|-- assets/
| |-- admin.css
| `-- admin.js
|-- includes/
| |-- class-admin-ui.php
| |-- class-auth.php
| |-- class-db.php
| |-- class-fix-engine.php
| |-- class-gsc-client.php
| |-- class-issue-engine.php
| |-- class-llm-client.php
| |-- class-plugin.php
| |-- class-robots-checker.php
| |-- class-scheduler.php
| |-- class-updater.php
| |-- class-utils.php
| `-- class-yoast-integration.php
|-- languages/
`-- templates/
Current Assessment
From a technical review perspective, the plugin already has a solid foundation for a premium WordPress SEO operations product:
- The class layout is modular and easy to extend.
- The issue and fix pipeline is more mature than a typical utility plugin.
- GSC, AI, schema, and fix handling are clearly separated.
- Rollback support and approval-aware flows reduce operational risk.
Areas that deserve ongoing attention as the plugin grows:
- Keep documentation aligned with the rapidly expanding issue-type matrix.
- Continue validating which admin settings are policy-only versus actively enforced in runtime logic.
- Add automated tests around fix application and rollback behavior to protect data-changing paths.
Author
- Author: Mudassar Hussain
- Website: https://waflowz.com