The DevSkyy WordPress Plugin
Relevant source files
The following files were used as context for generating this wiki page:
The Skyy Rose AI Agents plugin is an enterprise-grade WordPress tool that integrates the core functionality of the DevSkyy AI agent platform directly into the WordPress environment. It is a complete transformation of the original Python/FastAPI application into a native PHP-based plugin, designed for comprehensive AI-powered website management, optimization, and brand intelligence. The plugin provides a suite of specialized AI agents that operate in the background to analyze and improve site performance, security, and brand consistency.
The system is designed with a professional, object-oriented architecture, featuring a dedicated admin interface, a full REST API for custom integrations, and its own set of custom database tables for storing agent data and metrics. It also includes compatibility with WooCommerce and WordPress Multisite, making it a scalable solution for e-commerce and large-scale WordPress installations.
Sources: wordpress-plugin/README.md, wordpress-plugin/TRANSFORMATION_SUMMARY.php, wordpress-plugin/CHANGELOG.md
Architecture and File Structure
The plugin follows a modular, enterprise-level architecture that separates concerns into distinct directories for administration, core logic, AI agents, and API integration. This structure facilitates maintainability and scalability.
Sources: wordpress-plugin/TRANSFORMATION_SUMMARY.php:61-84, DIRECTORY_TREE.md:213-228
High-Level Architecture
The following diagram illustrates the main components of the plugin and their interactions.
This diagram shows how the plugin integrates with WordPress core systems like the Admin UI, Cron, and REST API, while internally managing its own components such as agents, settings, and database interactions.
Sources: wordpress-plugin/TRANSFORMATION_SUMMARY.php:61-84, DIRECTORY_TREE.md:213-228
File Structure
The plugin's directory structure is organized for clarity and separation of concerns.
| Path | Description |
|---|---|
/skyy-rose-ai-agents.php | The main plugin file containing headers and initialization logic. |
/uninstall.php | Handles the clean removal of plugin data upon uninstallation. |
/admin/ | Contains all files related to the WordPress admin interface, including the dashboard. |
/includes/ | Houses the core logic, including base classes and utilities. |
/includes/agents/ | Contains the individual PHP classes for each of the five AI agents. |
/includes/api/ | Manages the custom REST API endpoints for the plugin. |
/assets/ | Stores public-facing assets like CSS and JavaScript. |
/languages/ | Contains translation files for internationalization (i18n). |
/templates/ | Holds template files used by the plugin. |
Sources: wordpress-plugin/TRANSFORMATION_SUMMARY.php:61-84, DIRECTORY_TREE.md:213-228
Core AI Agents
The plugin includes five specialized AI agents, each designed to manage a specific aspect of the website. These agents can be run manually or scheduled to run automatically via WordPress cron.
| Agent | Description |
|---|---|
| Brand Intelligence Agent | Analyzes brand consistency across the site, including color schemes, typography, and content voice. Provides optimization recommendations. |
| Inventory Management Agent | Scans, catalogs, and manages digital assets. It can detect duplicates and optimize images for performance. |
| WordPress Optimization Agent | Performs comprehensive site optimization, including database cleanup, security hardening, and SEO enhancements. |
| Performance Monitoring Agent | Tracks real-time performance metrics, including Core Web Vitals, server response time, and database query performance. |
| Security Monitoring Agent | Conducts vulnerability scanning, malware detection, and file integrity monitoring to identify and report threats. |
Sources: wordpress-plugin/README.md:12-22, wordpress-plugin/CHANGELOG.md:14-20
Admin Interface
The plugin provides a comprehensive admin dashboard accessible via the "AI Agents" menu in the WordPress admin panel.
The dashboard provides:
- Real-time status of all AI agents.
- Performance metrics and security overview.
- A complete audit trail of agent actions.
- Quick actions for one-click agent execution.
- Interactive charts for analytics and trends.
The admin interface is managed by the Skyy_Rose_Admin and Skyy_Rose_Dashboard classes.
Sources: wordpress-plugin/README.md:73-81, wordpress-plugin/TRANSFORMATION_SUMMARY.php:100-106
REST API
The plugin exposes a set of custom REST API endpoints for headless control and integration with external systems. All endpoints are secured with WordPress nonces and user capability checks.
The base URL for the API is: /wp-json/skyy-rose-ai/v1/
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /status | Retrieves the current status of the plugin and its agents. |
POST | /agents/{agent}/{action} | Executes a specific action for a given agent. |
GET | /dashboard | Fetches all data required to render the admin dashboard. |
GET | /activities | Retrieves the log of all agent activities. |
GET | /metrics/performance | Gets the latest performance metrics collected by the Performance Agent. |
Sources: wordpress-plugin/README.md:129-135, wordpress-plugin/TRANSFORMATION_SUMMARY.php:116-117
API Request Flow
This sequence diagram shows the flow of an API call to execute an agent action.
Database Schema
Upon activation, the plugin creates several custom tables in the WordPress database to store its data, ensuring separation from core WordPress tables.
| Table Name | Description |
|---|---|
skyy_rose_agent_activities | Logs all agent execution details for audit trails. |
skyy_rose_agent_settings | Stores agent-specific configurations. |
skyy_rose_brand_data | Contains data and results from the Brand Intelligence Agent. |
skyy_rose_performance_metrics | Stores historical performance metrics collected by the Performance Agent. |
skyy_rose_inventory_assets | A catalog of all digital assets discovered by the Inventory Agent. |
Sources: wordpress-plugin/README.md:191-197, wordpress-plugin/CHANGELOG.md:22-28
Entity Relationship Diagram
This diagram shows the relationships between the custom tables.
Security
The plugin is built with enterprise-level security standards in mind, adhering to WordPress best practices.
- Nonce Verification: All form submissions and AJAX requests are protected against CSRF attacks using WordPress nonces.
- Input Sanitization: All data received from users or external sources is sanitized using functions like
sanitize_text_field(). - SQL Injection Prevention: All database queries are executed using
$wpdb->prepare()to prevent SQL injection. - Capability Checks: All administrative actions are protected with
current_user_can()to ensure only authorized users can perform them. - Output Escaping: All data output to the screen is escaped to prevent XSS attacks.
- Direct Access Prevention: All PHP files include a check to prevent direct file access.
Sources: wordpress-plugin/production-checklist.md:3-9, wordpress-plugin/README.md:167-172
Conclusion
The Skyy Rose AI Agents plugin successfully transforms the powerful, standalone DevSkyy AI platform into a fully integrated, native WordPress solution. By leveraging an object-oriented PHP architecture, custom REST API endpoints, and a dedicated admin interface, it provides a robust and scalable tool for automating website maintenance, optimization, and analysis. Its adherence to WordPress security and performance best practices makes it a production-ready tool for any enterprise-level WordPress site, especially those using WooCommerce.
Sources: wordpress-plugin/TRANSFORMATION_SUMMARY.php:119-123, wordpress-plugin/README.md:225-228