Secure AI Helper
Securely explains WordPress settings using OpenAI with YAML-based context.
★ 0stars
0forks
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/ref34t/secure-ai-helper/archive/refs/heads/main.zipReadme
Secure AI Helper
A WordPress plugin that provides AI-powered explanations of WordPress settings using OpenAI's GPT-4 API.
🚀 Features
- AI-Powered Explanations - Get clear, helpful explanations for any WordPress setting
- OpenAI GPT-4 Integration - Uses the latest GPT-4 model for accurate responses
- Clean Admin Interface - Easy-to-use WordPress admin panel
- Secure API Key Storage - Safe handling of your OpenAI API keys
- YAML Configuration - Customizable AI behavior and constraints
- WordPress Security - Follows WordPress security best practices
📦 Installation
Method 1: Upload Plugin ZIP
- Download the latest release ZIP file
- Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Select the ZIP file and click Install Now
- Click Activate Plugin
Method 2: Manual Installation
- Download or clone this repository
- Upload the
secure-ai-helperfolder to/wp-content/plugins/ - Activate the plugin through the WordPress Plugins menu
⚙️ Configuration
-
Get OpenAI API Key
- Visit OpenAI Platform
- Create an account and generate an API key
-
Configure Plugin
- Go to WordPress Admin → AI Helper
- Enter your OpenAI API key
- Click Save Changes
-
Test the Plugin
- Enter a WordPress setting name (e.g.,
blog_name,users_can_register) - Click Get Explanation
- View the AI-generated explanation
- Enter a WordPress setting name (e.g.,
🎯 Usage Examples
Try asking about these WordPress settings:
blog_name- Your site titleusers_can_register- User registration settingdefault_role- Default user role for new registrationsstart_of_week- First day of the weekdate_format- Date format settingpermalink_structure- URL structure setting
🛠️ Development
Requirements
- PHP 7.4 or higher
- WordPress 5.0 or higher
- Composer (for development)
Setup
git clone https://github.com/Ref34t/Secure-AI-Helper.git
cd Secure-AI-Helper
composer install
File Structure
secure-ai-helper/
├── assets/
│ ├── ai-helper.js # Frontend JavaScript
│ └── style.css # Admin styles
├── config/
│ └── ai-config.yaml # AI configuration
├── includes/
│ ├── class-admin-page.php # Admin interface
│ └── class-openai-client.php # OpenAI API client
├── vendor/ # Composer dependencies
├── secure-ai-helper.php # Main plugin file
└── README.txt # WordPress plugin readme
Key Components
- SAI_Admin_Page - Handles WordPress admin interface and AJAX requests
- SAI_OpenAI_Client - Manages OpenAI API communication
- YAML Configuration - Defines AI behavior and constraints
🔒 Security
This plugin implements WordPress security best practices:
- Nonce Verification - All AJAX requests are protected
- Capability Checks - Only administrators can access settings
- Input Sanitization - All user inputs are properly sanitized
- API Key Protection - Secure handling of sensitive API keys
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the GPL v2 License - see the LICENSE file for details.
🐛 Issues & Support
If you encounter any issues or need support:
- Check existing GitHub Issues
- Create a new issue with detailed information
- Include WordPress version, PHP version, and error messages
📝 Changelog
Version 1.0.0
- Initial release
- OpenAI GPT-4 integration
- WordPress admin interface
- YAML-based configuration
- Security implementation
⚡ Performance Notes
- API requests are cached to improve performance
- Timeouts are set to prevent hanging requests
- Response limits prevent excessive token usage
🌟 Acknowledgments
- Built with Symfony YAML
- Powered by OpenAI GPT-4
- Follows WordPress Plugin Standards
Made with ❤️ for the WordPress community