About
Smart Moderator v2.0.0 automatically reviews new posts and comments using AI (OpenAI GPT or Anthropic Claude) to prevent spam, abuse, and harmful content before publication. Administrators bypass all AI moderation to save API costs and enable quick publishing.
Key Features
- AI-driven moderation - Content is reviewed by OpenAI or Anthropic Claude via secure API
- Admin bypass - Administrators skip AI moderation entirely (no API cost for admin actions)
- Admin override system - Admins can manually approve AI-rejected content without re-moderation loops
- Custom prompts - Define global moderation rules and add context for posts or comments separately
- Immediate moderation - Content is approved or rejected as soon as it's saved
- Enforce moderation result - Re-checks and re-applies AI decision after 60 seconds to prevent overrides from other plugins (respects admin overrides)
- API failure rate limiting - Automatically pauses API calls after repeated failures to prevent hammering the endpoint
- Full logs (reverse chronological) - All moderation decisions stored per post/comment, ordered by most recent first
- Automatic model detection for OpenAI - No configuration needed for token limits
- GPT-5 reasoning optimization - Automatically uses low reasoning effort for efficient moderation
- Secure storage - API keys kept in database, never logged, transmitted only via HTTPS
- Compatible - Works with WordPress comment moderation settings and other plugins
How It Works
- User submits a post or comment
-
Check if the user is an administrator:
- ✅ If admin → Skip all moderation, publish immediately (no API cost)
- ❌ If non-admin → Continue to step 3
- Smart Moderator sends content to your AI endpoint (OpenAI or Anthropic Claude)
- AI returns "approve" or "reject" with optional reason
-
Plugin updates post/comment status immediately:
- Approved → published (if permissions allow)
- Rejected → held as pending/unapproved
- If "Enforce moderation result" is enabled, plugin schedules a check 60 seconds later to re-apply the AI's decision if anything changed (respects admin overrides)
Privacy & Data Handling
- API key stored locally in WordPress database
- Logs include only decision outcomes, reasons, and timestamps - not full content
- Smart Moderator makes requests only to your configured endpoint over HTTPS
- No user tracking or telemetry
- Admin content never sent to AI: Administrators bypass all moderation (no API calls)
- For posts: sends title + content (non-admin users only)
- For comments: sends comment text only, not commenter name/email (non-admin users only)
Supported AI Models (2025)
OpenAI Models (2025)
GPT-4o Series:
- gpt-4o-mini ($0.15/M)
- gpt-4o ($2.50/M) ✓
- chatgpt-4o-latest
GPT-5 Series (NEW):
- gpt-5-nano ($0.05/M in, $0.40/M out)
- gpt-5-mini
- gpt-5
O1 Series:
- o1, o1-preview, o1-mini
Legacy: GPT-3.5 Turbo, GPT-4, GPT-4 Turbo
Technical Note: No token limits enforced. GPT-5 uses reasoning_effort: "low" automatically.
Claude Models (2025)
Claude 4.x:
- claude-haiku-4-5 ($1/M)
- claude-sonnet-4 ($3/M) ✓
- claude-opus-4-5 ($15/M)
Claude 3.x:
- claude-haiku-3
- claude-sonnet-3.5
- claude-opus-3
Claude 2.x:
- claude-2.1, claude-2.0
Technical Note: Uses Messages API with 1024 token limit (API requirement).
Recommended Models
OpenAI:
- gpt-4o-mini - Fastest, most economical ($0.15/M)
- gpt-4o - Balanced performance ($2.50/M) ✅ Recommended
- gpt-5-nano - Ultra-fast reasoning model ($0.05/M input, $0.40/M output)
Claude:
- claude-haiku-4-5 - Fastest ($1/M)
- claude-sonnet-4-20250514 - Balanced ($3/M) ✅ Recommended
- claude-opus-4-1-20250805 - Maximum intelligence ($15/M)
Cost Examples
- OpenAI gpt-4o-mini: ~$0.15 per 1,000 comments
- OpenAI gpt-4o: ~$2.50 per 1,000 comments
- OpenAI gpt-5-nano: ~$0.05-$0.40 per 1,000 comments
- Anthropic claude-haiku-4-5: ~$1.00 per 1,000 comments
- Anthropic claude-sonnet-4: ~$3.00 per 1,000 comments
Typical blog with 100 comments/month: $0.01-$0.30/month
Installation
Quick Install
-
Upload plugin to
/wp-content/plugins/directory - Activate through Plugins → Installed Plugins
- Go to Tools → Smart Moderator
- Follow setup guide below for your chosen AI provider
- WordPress 6.0+ (tested up to 6.8)
- PHP 8.0+ (required)
- Outbound HTTPS connections enabled
- API key from OpenAI or Anthropic (v2.0 supports only these providers)
Setup Guides
Setup for Anthropic Claude
Step 1: Get API Key
- Visit https://console.anthropic.com
- Sign up or sign in
- Go to API Keys section
- Create new key (name it "WordPress")
-
Copy the key immediately (starts with
sk-ant-)
Step 2: Configure Plugin
- Go to Tools → Smart Moderator in WordPress
- Enter these exact settings:
- API Key: Paste your full key (100+ characters)
-
API Endpoint URL:
https://api.anthropic.com/v1/messages - Auth Header Name:
x-api-key - Auth Header Prefix: Leave empty (do NOT type "Bearer")
-
Extra Headers:
{"anthropic-version":"2023-06-01"} -
Model:
claude-sonnet-4-20250514(recommended)
- Click Save & Test Connection
- Look for green success message
Recommended Models (2025):
claude-haiku-4-5- Fastest ($1/M tokens)-
claude-sonnet-4-20250514- Balanced ($3/M tokens) ✅ Recommended -
claude-opus-4-1-20250805- Maximum intelligence ($15/M tokens)
Also Supported: Claude 3.x (Opus, Sonnet 3.5, Haiku), Claude 2.x (2.1, 2.0)
Setup for OpenAI GPT
Step 1: Get API Key
- Visit https://platform.openai.com
- Sign up or sign in
- Go to API Keys section
- Create new secret key
-
Copy immediately (starts with
sk-orsk-proj-) - Add billing info and credits to your account
Step 2: Configure Plugin
- Go to Tools → Smart Moderator
- Enter these exact settings:
- API Key: Paste your full key
-
API Endpoint URL:
https://api.openai.com/v1/chat/completions -
Auth Header Name:
Authorization -
Auth Header Prefix:
Bearer(capital B) - Extra Headers: Leave empty
- Model:
gpt-4o(recommended)
- Click Save & Test Connection
- Look for green success message
Recommended Models (2025):
-
gpt-4o-mini- Fastest, most economical ($0.15/M) -
gpt-4o- Balanced performance ($2.50/M) ✅ Recommended -
gpt-5-nano- NEW: Ultra-fast reasoning ($0.05/M in, $0.40/M out) gpt-5-mini- NEW: Mid-tier reasoning modelgpt-5- NEW: Advanced reasoning model
Also Supported: O1 series (o1, o1-preview, o1-mini), GPT-4 Turbo, GPT-4, GPT-3.5 Turbo
Technical Note: GPT-5 models automatically use reasoning_effort: "low" for efficient moderation.
Frequently Asked Questions
No. Smart Moderator v2.0 supports both OpenAI GPT and Anthropic Claude APIs. You can use either provider based on your preference and budget.
If the request fails or credentials are missing, Smart Moderator defaults to "approve" to avoid blocking your publishing workflow.
API Failure Rate Limiting: After 5 consecutive API failures within 1 hour, the plugin automatically pauses API calls to prevent hammering the endpoint. Content will be auto-approved during this period. Rate limiting resets automatically on the first successful API response.
Yes - admins can always override AI decisions:
- When an admin manually publishes AI-rejected content, an "admin override" flag is set
- The delayed enforcement (if enabled) respects admin overrides and won't revert them
- If a non-admin later edits that content, the override flag is cleared and AI moderation runs again
- Admins bypass all AI moderation entirely (no API calls for admin-created content)
For posts: title + content (combined as one text)
For comments: comment text only (not name/email)
Yes. Smart Moderator runs after most spam filters, so it acts as a second layer of defense.
Yes. The plugin moderates all public post types except pages and attachments. Note: Content created by administrators is never moderated (admin bypass).
For Anthropic users:
- Auth Header Prefix must be EMPTY (not "Bearer")
- Re-enter API key: delete all dots first, then paste fresh key
-
Auth Header Name must be lowercase:
x-api-key -
Extra Headers must include:
{"anthropic-version":"2023-06-01"}
For OpenAI users:
-
Auth Header Prefix must be
Bearer(capital B) - Re-enter API key: delete all dots first, then paste fresh key
-
Auth Header Name must be:
Authorization(capital A) - Check billing at https://platform.openai.com/account/billing
Yes. It does not modify front-end behavior or rely on cookies.
No. Smart Moderator does not collect or transmit any user data except the content being moderated to your configured AI endpoint.
Yes. Moderation logs are stored as metadata on each post/comment,
including the decision (approve/reject), reason, and timestamp.
Logs are currently stored in post/comment metadata
(_smartmoderator_log) and visible in debug logs. A UI
for viewing logs is coming in a future version.
Yes. Each site in a multisite network has its own settings.
Compatibility
- WordPress 6.0+ (tested up to 6.8)
- PHP 8.0+ (required)
- OpenAI API (all GPT models including GPT-5 series)
- Anthropic Claude API (all Claude 2.x, 3.x, and 4.x models)
- Works with: WooCommerce, bbPress, BuddyPress, and most comment plugins
- Compatible with: All major caching plugins, security plugins
Performance
- Minimal impact on site speed (moderation runs asynchronously)
- No front-end JavaScript or CSS
- No database queries on front-end
- Optimized for OpenAI and Claude APIs with automatic model detection
Security
- No eval(), exec(), or dangerous functions
- All database queries use $wpdb->prepare()
- All output escaped
- All input validated and sanitized
- API keys never appear in logs or debug output
Changelog
Version 2.0.0 - Major Release (2025)
- ⚠️ BREAKING: Now explicitly supports only OpenAI and Anthropic Claude (no longer API-agnostic)
- NEW: Added GPT-5 support (gpt-5, gpt-5-mini, gpt-5-nano)
- NEW: Automatic reasoning optimization for GPT-5 models (uses reasoning_effort: "low")
- NEW: Support for all Claude 4.x models (Opus 4.5, Sonnet 4, Haiku 4.5)
- IMPROVED: Removed token limits for OpenAI (simplified, no empty responses)
- IMPROVED: Architecture redesign with SOLID principles (Strategy Pattern, Factory Pattern)
- IMPROVED: 114 lines of code removed through simplification
- IMPROVED: Immutable value objects for better code quality (PHP 8.0+)
- IMPROVED: Logs ordered by most recent first (reverse chronological)
- FIXED: Editor post updates now properly remoderated
- FIXED: Claude max_tokens increased to 1024 (generous limit, API requirement)
- UPDATED: All documentation to reflect OpenAI/Claude only support
- UPDATED: WordPress tested up to 6.8
- UPDATED: PHP 8.0+ now required
Version 1.1.0 - Initial Release
- AI-Powered Moderation: Real-time content analysis for posts and comments using OpenAI, Anthropic Claude, or compatible LLM APIs
- Admin Bypass System: Administrators skip all AI moderation (saves API costs, prevents loops)
- Admin Override Flag: Prevents re-moderation when admins consciously override AI decisions
- Delayed Enforcement: Optional 60-second re-check to ensure moderation decisions remain final
- API Failure Rate Limiting: Automatically pauses API calls after 5 consecutive failures to prevent endpoint hammering
- OpenAI Compatibility: Auto-detects and uses max_completion_tokens for newer OpenAI models (o1, gpt-4o variants)
- Custom Prompts: Separate moderation rules for posts and comments
- Detailed Logging: Every decision recorded with timestamp, reason, and decision type
- Complete Uninstall: Removes all metadata, options, and transients when uninstalled
- WordPress.org Compliance: Full adherence to WordPress plugin directory guidelines
- Comprehensive Documentation: Official API references, troubleshooting guides, and setup instructions
Support
For support, bug reports, or feature requests, please contact the plugin author at linda.scoon@purplefootsteps.co.uk.
/wp-content/debug.log if you encounter issues.
Get Started
Get started with Smart Moderator today and protect your WordPress site from spam and harmful content.
Contact the plugin author for installation instructions and access.