Smart Comment Transformer
Transform spam and irrelevant WordPress comments into relevant, on-topic discussions using AI. Supports Google Gemini, OpenAI, and Antigravity CLI.
by Duy Nguyen · github.com/duyn1412/smart-comment-transformer · website
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/duyn1412/smart-comment-transformer/archive/refs/heads/main.zipTransform spam and irrelevant comments into relevant, on-topic discussions using AI. Supports Google Gemini, OpenAI, and CLI mode.
Description
Smart Comment Transformer uses AI to analyze pending comments and determine if they are relevant to the post or spam. Irrelevant comments are automatically rewritten to be on-topic while preserving the original commenter's information (name, email, URL, date).
Key Features
- AI-Powered Spam Detection — Compares comment content against the post to determine relevance
- Smart Rewriting — Transforms spam into natural, on-topic comments
- Auto-Reply — Generates appropriate author responses
- Dual Processing Modes — Manual preview for control, or full auto for hands-off operation
- Configurable Cron — Schedule processing: hourly, daily, weekly, or manual only
- Multiple AI Providers — Google Gemini, OpenAI, or Antigravity CLI (free, no API key)
- REST API — Full REST API for external integrations
- Activity Log — Track all transformations with before/after history
- Reversible — Original comments are backed up and can be restored
- WordPress.org Compliant — Follows all WordPress coding standards
AI Providers
- Google Gemini — Free tier available, fast and accurate
- OpenAI (GPT-4o mini) — Premium quality analysis
- Antigravity CLI — Free mode using REST API endpoints with external AI tools
How It Works
- Install and activate the plugin
- Go to Settings → Comment Transformer and configure your AI provider
- Choose your processing mode (Manual Preview or Full Auto)
- Set your cron schedule
- Visit Tools → Transform Comments to review and manage pending comments
REST API Endpoints
GET /wp-json/sct/v1/pending— List pending comments with post contextPOST /wp-json/sct/v1/transform— Transform a single commentPOST /wp-json/sct/v1/transform-batch— Batch transform multiple commentsGET /wp-json/sct/v1/stats— Processing statistics
Installation
- Upload the
smart-comment-transformerfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings → Comment Transformer to configure your AI provider and API key
- Visit Tools → Transform Comments to start processing comments
Frequently Asked Questions
Is my API key secure?
Yes. API keys are encrypted using AES-256-CBC before being stored in the database.
Can I undo a transformation?
Yes. The original comment content is saved in comment meta (_sct_original_content) before any transformation.
Does the free Antigravity CLI mode work without an API key?
Yes. Antigravity CLI mode uses REST API endpoints. You run a local script that handles the AI analysis externally. No API key is stored in WordPress.
Will this work with any post type?
Yes. The plugin analyzes comments on all post types.
What happens to relevant comments?
Relevant comments are automatically approved as-is. Only spam/irrelevant comments are rewritten.
Screenshots
- Settings page — AI provider configuration and cron schedule
- Dashboard — Pending comments with AI analysis and action buttons
- Activity log — History of all transformations
Changelog
1.0.0
- Initial release
- Google Gemini and OpenAI support
- Antigravity CLI mode with REST API
- Manual preview and full auto processing modes
- Configurable cron scheduling
- Activity log and statistics
- Encrypted API key storage
Upgrade Notice
1.0.0
Initial release. Configure your AI provider in Settings → Comment Transformer.