# Ayzeo GEO + SEO

Tested up to: 7.1
Requires at least: 6.5
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPLv2 or later

WordPress plugin for Ayzeo GEO + SEO. Analyze SEO and AI readiness, run AI visibility queries, and generate optimized content pages.

## Features

The plugin has two halves. Everything in the first half runs on your own server without an Ayzeo account; the second half needs a project on [ayzeo.com](https://ayzeo.com).

### Without an account

- **Site Audit**: a local, algorithmic scan of your most important pages with the Ayzeo rulebook (titles and meta descriptions, headings, canonical tags, structured data, Open Graph, author attribution, freshness, image alt coverage, mixed content, render blocking) plus site checks (robots.txt, AI crawler access, sitemaps, llms.txt, the AI instructions page, HTTPS, security headers, redirects). No AI service is called.
- **One click fixes**: JSON-LD from your own content, meta description and Open Graph fallbacks when no SEO plugin provides them, and an alt text helper. Fixes are previewed and revertible.
- **IndexNow**: automatic submission of new, updated, unpublished and deleted URLs to Bing and the other IndexNow engines, with key file handling, a background queue with retries, a submission log and coexistence detection for Yoast, Rank Math, AIOSEO, SEOPress and the Microsoft IndexNow plugin.
- **AI crawler policy**: an explicit robots.txt policy for the 18 AI crawlers Ayzeo tracks, or a paste block when a physical robots.txt exists.
- **llms.txt**: editor with live preview, served at `/llms.txt` exactly as written.

### With an Ayzeo project

- Deep scans with AI specific checks and suggested meta tags, JSON-LD and llms.txt content to apply in one click.
- AI visibility queries: ask a question and see how an AI engine answers it and which sources it opened.
- Content pages optimised for AI answers, published into WordPress as drafts.

### With an Ayzeo Pro plan

- GEO overview inside WordPress: visibility share, mention rate, citation rate, average mention position and sentiment against the previous period, a trend chart, competitor ranking, prompt status and a dashboard widget.

The wp.org listing text lives in `readme.txt`; this file is the developer facing documentation. Keep the feature list and the version in both files in step.

## Installation

### Method 1: Manual Installation

1. **Download the Plugin**
   - Download or clone this repository
   - Ensure all files are in a folder named `ayzeo-geo-seo`

2. **Upload to WordPress**
   ```bash
   # Upload the entire plugin folder to your WordPress installation
   wp-content/plugins/ayzeo-geo-seo/
   ```

3. **Activate the Plugin**
   - Go to your WordPress admin dashboard
   - Navigate to **Plugins > Installed Plugins**
   - Find "Ayzeo GEO + SEO" and click **Activate**

### Method 2: Upload via WordPress Admin

1. **Zip the Plugin**
   - Create a ZIP file of the entire plugin folder
   - Name it `ayzeo-geo-seo.zip`

2. **Upload via Admin**
   - Go to **Plugins > Add New**
   - Click **Upload Plugin**
   - Choose your ZIP file and click **Install Now**
   - Click **Activate Plugin**

## Setup & Configuration

### Step 1: Create Ayzeo Account
1. Visit [ayzeo.com](https://ayzeo.com)
2. Create an account (connecting the plugin needs a paid plan or the free trial)
3. Create a new project for your website

### Step 2: Generate API Token
1. In your Ayzeo dashboard, go to **Project Settings**
2. Navigate to **API Tokens**
3. Generate a new API token for your project
4. Copy the token (you'll need it for the next step)

### Step 3: Configure Plugin
1. In WordPress admin, go to **Ayzeo > Settings**
2. Paste your API token in the **API Token** field
3. Click **Test Token** to verify the connection
4. Click **Save Settings**

## Usage

The plugin adds an **Ayzeo** menu with six screens:

- **Overview**: connection state, technical score of the latest platform scan, site audit and IndexNow status, and the GEO KPIs on Pro plans.
- **Site Audit**: run the local audit, read page reports and apply fixes.
- **Indexing and Crawlers**: IndexNow, the AI crawler policy and the llms.txt editor as tabs.
- **AI Content**: AI visibility queries, content generation and post creation (connected projects).
- **Settings**: API token, plan and daily limits, preferences, diagnostics with a copyable debug report.
- **Help**: getting started, the external services the plugin talks to, and support contacts.

Posts and Pages list tables get a "Scan with Ayzeo" row action and the Ayzeo and IndexNow columns.

## Limits

Daily limits for AI queries and platform scans depend on the plan of the connected project and are shown under Ayzeo, Settings. Content generation is limited to 3 pages per day. The plugin keeps all screens together under 90 platform requests per 5 minutes.

## WordPress Compatibility

- **WordPress Version**: 6.5 or higher
- **PHP Version**: 7.4 or higher (tested on 7.4 to 8.4)
- **Tested up to**: WordPress 7.1
- **Multisite**: single-site only

## Security Features

- **Nonce Verification**: All AJAX requests use WordPress nonces
- **Capability Checks**: Proper user permission validation
- **Data Sanitization**: All inputs are sanitized and validated
- **Secure API Communication**: HTTPS-only API requests
- **Token Protection**: API tokens are securely stored

## Troubleshooting

### API Token Issues
- **Invalid Token**: Verify your token in Ayzeo dashboard
- **Connection Failed**: Check your internet connection and firewall
- **Token Expired**: Generate a new token in Ayzeo dashboard

### Plugin Conflicts
- **JavaScript Errors**: Check browser console for conflicts
- **CSS Issues**: Verify no theme conflicts with admin styles
- **AJAX Failures**: Ensure WordPress AJAX is functioning properly

### Performance Issues
- **Slow API Calls**: API requests may take 30-60 seconds
- **Memory Usage**: Large content generation may require adequate PHP memory
- **Database Space**: Plugin creates 3 additional database tables

## Support

### Documentation
- **Ayzeo Docs**: [ayzeo.com/faq](https://ayzeo.com/faq)
- **WordPress Codex**: [codex.wordpress.org](https://codex.wordpress.org)

### Contact Support
- **Email**: hello@ayzeo.com
- **Contact**: [ayzeo.com/contact](https://ayzeo.com/contact)

### Bug Reports
If you find bugs or have feature requests:
1. Check existing issues in the repository
2. Create a detailed bug report with steps to reproduce
3. Include WordPress version, PHP version, and plugin version

## Development

```bash
composer install                 # PHPCS (WordPress-Extra), PHPUnit
composer lint && composer phpcs  # syntax + coding standards
npx @wordpress/env start         # local WordPress on http://localhost:8888 (admin / password)
npx @wordpress/env run tests-cli --env-cwd=wp-content/plugins/ayzeo-geo-seo vendor/bin/phpunit
bash zip-plugin.sh               # build the distributable zip
```

The plugin is organised in modules (`includes/Modules/*`) on top of a small foundation (`includes/Plugin.php`, `includes/Admin`, `includes/Api`). `CLAUDE.md` documents the module and screen contracts.

## Changelog

### Version 1.2.1
- Site Audit: new site check for a public, indexable AI instructions page (`/ai-instructions`, or a published page with that slug) with the same rule, reason texts and weight (5) as the Ayzeo platform, plus a fix card that explains how to publish one.
- Site Audit: robots.txt path rules are matched with a linear-time pattern walk, so a Disallow line with many wildcards can no longer stall a scan.

### Version 1.2.0
- New foundation: namespaced, module based architecture (`Ayzeo\WP`), one API client with caching, error mapping and a request budget, admin screens Overview, Site Audit, Indexing and Crawlers, AI Content, Settings and Help.
- New admin design system that mirrors the Ayzeo platform, with no inline scripts or styles.
- Settings: connection card with plan and deep links, token test, preferences, diagnostics with loopback and cron checks and a copy-to-clipboard debug report.
- llms.txt editor moved to the Indexing and Crawlers screen; the file is served unescaped as text/plain with nosniff.
- The old "Dashboard" menu slug redirects to the new Overview.
- Requires WordPress 6.5 and PHP 7.4; uninstall removes every option, table, transient, cron event and post meta of the plugin.

### Version 1.1.1
- Fixed a "414 Request-URI Too Large" error when saving long LLMS.txt content (e.g. after "Generate from Analysis"). The LLMS.txt form now uses `method="post"`, so content is never sent through the URL query string.

### Version 1.1.0
- Added LLMS.txt management with live preview editor and auto-generation from analysis
- Improved data sanitization and escaping throughout the plugin
- Improved nonce verification with proper sanitization
- Added external services documentation
- Updated Author URI and Plugin URI

### Version 1.0.0
- Initial release
- Basic API integration with Ayzeo platform
- Website analysis functionality
- AI visibility queries
- Content generation and WordPress integration
- Responsive admin interface
- Security implementations

## External services

This plugin connects to the [Ayzeo](https://ayzeo.com) API to provide SEO analysis, AI visibility testing, and content generation features. Ayzeo is a service provided by Fyrma Inc.

**Service endpoint:** `https://ayzeo.com/api`

### What data is sent and when

All requests are authenticated using an API token that the site administrator configures in the plugin settings. The following data is transmitted:

- **Token validation** (when saving or testing the API token): The API token is sent to verify it is valid and to retrieve the associated project name and domain.
- **Website analysis** (when the user clicks "Run Analysis"): The URL of the page being analyzed is sent.
- **AI visibility query** (when the user clicks "Run AI Query"): The search query text entered by the user is sent.
- **Content generation** (when the user clicks "Generate Content"): The content topic or keywords entered by the user are sent.
- **Fetch analysis result** (when the user views a previous analysis): The analysis ID is sent to retrieve stored results.

No user personal data, visitor data, or tracking information is collected or transmitted. Only project-related data explicitly entered by the site administrator is sent.

- [Ayzeo Terms of Service](https://ayzeo.com/terms)
- [Ayzeo Privacy Policy](https://ayzeo.com/privacy)

## License

This plugin is licensed under the GPL v2 or later.

```
Copyright (C) 2026 Ayzeo

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
```

## Credits

- **Developed for**: Ayzeo GEO + SEO Platform
- **WordPress Integration**: Following WordPress coding standards
- **UI/UX**: Modern WordPress admin interface design
- **Security**: WordPress security best practices

---

**Ready to optimize your website for both search engines and AI models?**

[Get started with Ayzeo](https://ayzeo.com) and take your SEO to the next level!