Generate SEO-optimized WordPress content using OpenAI's GPT models. Create blog posts, pages, and more with AI-powered content generation.
AI Content Classifier is now officially available on WordPress.org! Install directly from your WordPress admin dashboard.
π¦ Install from WordPress.org | π Plugin Directory Page
AI Content Classifier is a security-hardened, WordPress.org compliant plugin that leverages OpenAI's most advanced GPT models to help you create high-quality, SEO-optimized content directly from your WordPress dashboard. Built with enterprise-grade security and performance optimization.
- β WordPress.org Official - Fully compliant and approved
- β Security Hardened - Enterprise-grade protection
- β Performance Optimized - Built for high-traffic sites
- β Cost Tracking - Monitor every penny spent
- β Professional Support - Community and documentation
- Multiple AI Models - GPT-3.5 Turbo, GPT-4, GPT-4 Turbo support
- Smart Content Types - Blog posts, pages, product descriptions, emails
- Context Awareness - Understands your brand and tone
- Bulk Operations - Generate multiple pieces simultaneously
- Auto Meta Descriptions - SEO-optimized meta tags
- Keyword Integration - Smart keyword placement
- Content Scoring - Real-time SEO analysis
- Readability Metrics - Ensure engaging content
- Custom Templates - Save and reuse prompts
- Variable Support - Dynamic content with {{variables}}
- Team Sharing - Collaborate with your team
- Template Library - Pre-built professional templates
- Input Sanitization - All user input properly cleaned
- XSS Protection - Cross-site scripting prevention
- CSRF Protection - Nonce verification on all actions
- Rate Limiting - Configurable API abuse protection
- Encrypted Storage - API keys stored securely
- Cost Monitoring - Real-time expense tracking
- Usage Analytics - Token consumption insights
- Performance Metrics - Generation success rates
- Export Reports - Download usage data
- REST API - Programmatic content generation
- Hooks & Filters - Extensive customization options
- Multisite Compatible - Works with WordPress networks
- WP-CLI Support - Command-line operations
Content Creators | E-commerce | Agencies | Developers |
---|---|---|---|
β Blog posts | β Product descriptions | β Client content | β API integration |
β Social media | β Category pages | β Bulk operations | β Custom workflows |
β Email campaigns | β Marketing copy | β Template sharing | β Automation |
β Landing pages | β SEO content | β Multi-site | β White-label |
- Go to Plugins β Add New in your WordPress admin
- Search for "AI Content Classifier"
- Click Install Now β Activate
- Navigate to AI Content β Settings
- Add your OpenAI API key
- Download from WordPress.org
- Upload to
/wp-content/plugins/ai-content-classifier/
- Activate through the Plugins screen
- Configure in AI Content β Settings
wp plugin install ai-content-classifier --activate
wp plugin update ai-content-classifier
# Visit: https://platform.openai.com/api-keys
# 1. Create account or sign in
# 2. Generate new API key
# 3. Add billing method
# 4. Copy API key (starts with 'sk-')
- WordPress Admin β AI Content β Settings
- Paste API Key in the secure field
- Select Model (GPT-3.5 Turbo recommended)
- Set Rate Limits (50 requests/hour default)
- Test Connection to verify setup
- AI Content β Generate
- Enter your topic: "Benefits of AI in small business marketing"
- Add target keywords: "AI marketing, small business, automation"
- Click π Generate Content
- Review, edit, and publish!
Requirement | Minimum | Recommended |
---|---|---|
WordPress | 5.0+ | Latest version |
PHP | 7.4+ | 8.1+ |
MySQL | 5.6+ | 8.0+ |
Memory | 128MB | 256MB+ |
Extensions | cURL, JSON | cURL, JSON, OpenSSL |
- OpenAI API - Content generation (paid service)
- API Key Required - Get from OpenAI Platform
Content generation costs depend on the OpenAI model:
Model | Input Cost | Output Cost | Typical Blog Post |
---|---|---|---|
GPT-3.5 Turbo | $0.0005/1K tokens | $0.0015/1K tokens | $0.003 |
GPT-4 | $0.03/1K tokens | $0.06/1K tokens | $0.08 |
GPT-4 Turbo | $0.01/1K tokens | $0.03/1K tokens | $0.04 |
π‘ Pro Tip: Start with GPT-3.5 Turbo for cost-effective content, upgrade to GPT-4 for premium quality.
Content Generation | SEO Analytics | Template Management | Settings Panel |
---|---|---|---|
- β All WordPress Plugin Check tests passed
- β SQL injection prevention with prepared statements
- β Complete input sanitization and output escaping
- β Proper nonce verification on all actions
- β Capability checks for all user interactions
// Input Sanitization
$user_input = sanitize_text_field($_POST['prompt']);
// Database Security
$results = $wpdb->prepare(
"SELECT * FROM {$table} WHERE user_id = %d",
$user_id
);
// Output Escaping
echo esc_html($generated_content);
// Nonce Verification
wp_verify_nonce($_POST['nonce'], 'generate_content');
curl -X POST "https://yoursite.com/wp-json/aicg/v1/generate" \
-H "Content-Type: application/json" \
-H "X-WP-Nonce: YOUR_NONCE" \
-d '{
"prompt": "Write about sustainable business practices",
"content_type": "post",
"seo_enabled": true,
"target_keywords": "sustainability, green business, eco-friendly"
}'
{
"success": true,
"data": {
"title": "10 Sustainable Business Practices That Drive Growth",
"content": "In today's environmentally conscious market...",
"meta_description": "Discover 10 proven sustainable business practices...",
"keywords": ["sustainability", "green business", "eco-friendly"],
"seo_score": 8.5,
"readability": 92,
"tokens_used": 1247,
"estimated_cost": 0.003
}
}
// Before content generation
add_action('aicg_before_generate', 'my_pre_generation_function');
// After content generation
add_action('aicg_after_generate', 'my_post_generation_function');
// Daily cleanup
add_action('aicg_cleanup_temp_data', 'my_cleanup_function');
// Customize prompts
add_filter('aicg_sanitize_prompt', 'my_prompt_customizer');
// Filter generated content
add_filter('aicg_filter_content', 'my_content_filter');
// Modify API responses
add_filter('aicg_api_response', 'my_response_modifier');
CREATE TABLE wp_aicg_templates (
id mediumint(9) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
prompt text NOT NULL,
content_type varchar(50) DEFAULT 'post',
seo_enabled boolean DEFAULT true,
created_at datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
CREATE TABLE wp_aicg_usage_log (
id mediumint(9) NOT NULL AUTO_INCREMENT,
user_id bigint(20) NOT NULL,
tokens_used int(11) NOT NULL DEFAULT 0,
cost decimal(10,6) NOT NULL DEFAULT 0.000000,
model varchar(50) NOT NULL,
created_at datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
Q: Do I need an OpenAI API key?
A: Yes, you need an active OpenAI API key with billing enabled. Sign up at OpenAI Platform, add a payment method, and generate an API key.
Q: How much does content generation cost?
A: Costs vary by model:
- GPT-3.5 Turbo: ~$0.003 per 1,000-word blog post
- GPT-4: ~$0.08 per 1,000-word blog post
- The plugin includes real-time cost tracking.
Q: Is my content stored externally?
A: No. Generated content is only stored in your WordPress database when you save it. The plugin doesn't store content externally.
Q: Can I customize the AI prompts?
A: Yes! Use the advanced template system to create custom prompts with variables like {{topic}}
, {{keywords}}
, and {{tone}}
.
Q: Does this work with WordPress Multisite?
A: Yes, the plugin is fully compatible with WordPress Multisite installations.
Q: What about rate limiting?
A: The plugin includes configurable rate limiting (default: 50 requests/hour per user) to prevent API abuse and control costs.
# Symptoms: "Invalid API key" error
β
Verify key starts with 'sk-'
β
Check billing is enabled in OpenAI account
β
Ensure key has correct permissions
β
Test in plugin settings panel
# Symptoms: "Rate limit exceeded" message
β
Default limit is 50 requests/hour per user
β
Wait for rate limit reset (1 hour)
β
Increase limit in settings if needed
β
Use bulk operations for efficiency
# Symptoms: Blank or error responses
β
Check WordPress error logs
β
Verify cURL is enabled (phpinfo())
β
Test API connection in settings
β
Ensure sufficient OpenAI credits
Enable WordPress debugging for detailed error information:
// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
// Check logs at: /wp-content/debug.log
We welcome contributions! Here's how to get involved:
# Clone repository
git clone https://github.com/ref34t/ai-content-classifier.git
cd ai-content-classifier
# Install dependencies (if using Composer)
composer install
# Create feature branch
git checkout -b feature/amazing-new-feature
# Make changes and test
# Submit pull request
- Follow WordPress coding standards
- Include unit tests for new features
- Update documentation as needed
- Test with WordPress Plugin Check
- Submit detailed pull requests
- Complete SQL injection prevention with proper prepared statements
- Enhanced security hardening across all database operations
- Improved bulk operations with secure query construction
- REST API security fixes with proper parameter handling
- User activity monitoring with secure database queries
- Zero critical vulnerabilities - fully submission ready
- Professional banners (1544x500, 772x250) with AI branding
- Modern icons (256x256, 128x128) with gradient design
- Interface screenshots showcasing all major features
- Complete plugin directory presentation ready
- Enhanced data sanitization with comprehensive JSON validation
- Fixed all SQL injection vulnerabilities with wpdb::prepare()
- Updated class naming conventions (OpenAI_Client β AICG_OpenAI_Client)
- Verified variable escaping in inline scripts
- Comprehensive security audit completed
- 100% WordPress.org submission ready
- Fixed SQL preparation errors in bulk operations and REST API
- Enhanced WordPress coding standards compliance
- Improved query preparation eliminating security violations
- Streamlined database queries for better performance
- Fixed 3 critical database query errors with proper $wpdb->prepare()
- Enhanced $_POST nonce validation across all AJAX handlers
- 50+ input validation fixes resolved
- Fixed $_SERVER sanitization for IP address handling
- Improved template editor security with proper isset() checks
- AI content generation with multiple GPT models
- SEO optimization engine with meta tag generation
- Template system for reusable prompts
- REST API for developer integration
- Rate limiting and cost tracking
- Security hardening from day one
- π Plugin Homepage
- π¦ WordPress.org Plugin Page
- π GitHub Repository
- π¨βπ» Author Website
- π€ OpenAI Platform
- π OpenAI API Documentation
- π OpenAI Privacy Policy
- π¬ WordPress.org Support Forum
- π GitHub Issues
- π Documentation Wiki
This plugin is licensed under the GNU General Public License v2.0 or later.
AI Content Classifier - WordPress Plugin
Copyright (C) 2024 Mo Khaled
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.
This plugin uses the OpenAI API, a third-party service. We are not responsible for:
- Content generated by the AI models
- Costs incurred through OpenAI API usage
- OpenAI service availability or changes
- AI-generated content may not always be accurate - Always review before publishing
- You are responsible for all published content - Review and edit as needed
- Respect copyright and intellectual property - Ensure content originality
We are not affiliated with OpenAI, Inc. This is an independent WordPress plugin.
β Enjoying AI Content Classifier?
- Rate us on WordPress.org βββββ
- Follow us on GitHub π
- Share with your network π¦
Thank you for choosing AI Content Classifier! π
Last updated: August 11, 2024 | Version 1.1.4 | View all changes β