# Project Overview

This project is a WordPress plugin called "SEO AI Audit Tool". It provides SEO and CRO (Conversion Rate Optimization) auditing functionalities for WordPress sites. The plugin uses AI to provide content analysis and suggestions. It also integrates with Google Search Console and Ahrefs to import and analyze data.

## Main Technologies

*   **Backend:** PHP (WordPress plugin development)
*   **Frontend:** JavaScript (jQuery), CSS
*   **Database:** WordPress database (custom tables)
*   **APIs:** OpenAI, Google Search Console, Ahrefs

## Architecture

The plugin follows a Model-View-Controller (MVC) like architecture:

*   **`seo-ai-audit-tool.php`:** The main plugin file. It handles initialization, hooks, and loading of other files.
*   **`includes/`:** This directory contains the core logic of the plugin.
    *   **`controllers/`:** Contains the controller class that handles user input and interacts with the model and view.
    *   **`models/`:** Contains the model class that handles data and business logic.
    *   **`views/`:** Contains the view class that handles the presentation of data.
    *   **`class-seo-audit-loader.php`:**  Handles the loading of actions and filters.
    *   **`class-seo-audit-ajax.php`:**  Handles all AJAX requests.
    *   **`class-seo-audit-db.php`:**  Handles all database interactions.
*   **`assets/`:** Contains CSS, JavaScript, images, and other assets.

# Building and Running

This is a WordPress plugin and should be installed and run within a WordPress environment.

1.  **Installation:**
    *   Copy the entire project directory to the `wp-content/plugins/` directory of a WordPress installation.
    *   Activate the plugin from the WordPress admin panel.

2.  **Running:**
    *   The plugin's main interface is located in the WordPress admin panel under "SEO AI Audit Tool".

# Development Conventions

*   The project uses a namespace `SEO_Audit_Tool`.
*   Class names are in `PascalCase` and file names are in `kebab-case` with a `class-` prefix for class files.
*   The plugin uses WordPress coding standards.
*   AJAX actions are prefixed with `seoaudp_`.
*   Database tables are prefixed with `seoaudp_`.
*   JavaScript files are located in `assets/js/` and CSS files are in `assets/css/`.
*   The main JavaScript file is `assets/js/seoaudp-script.js`.
*   The main CSS file is `assets/css/seoaudp-style.css`.
