Simple Content Analyzer for LLMs
A WordPress plugin to let editors securely analyze post/page content with LLMs for readability, indexability (LLM/AI search only), actionable improvements, and cross-post strategies.
by Your Name · github.com/dr-robert-li/simple-content-analyzer-for-llms · 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/dr-robert-li/simple-content-analyzer-for-llms/archive/refs/heads/main.zipReadme
Simple Content Analyzer for LLMs
A production-grade WordPress plugin that enables editors to securely analyze post/page content using leading LLM APIs for readability, indexability (LLM/AI search optimization), actionable improvements, and cross-platform posting strategies.
🚀 Features
Core Analysis Capabilities
- Readability Analysis: Get detailed readability scores, feedback, and improvement suggestions
- LLM/AI Indexability: Optimize content for AI search engines and LLM-powered search systems
- Content Improvements: Receive categorized suggestions for structure, clarity, engagement, SEO, and CTAs
- Cross-Platform Optimization: Generate platform-specific content adaptations for social media
LLM Provider Support
- OpenAI GPT-5: Latest GPT model with advanced content analysis
- Anthropic Claude Sonnet 4: Claude's most capable model for nuanced feedback
- Perplexity AI: Real-time web-connected analysis and recommendations
- Google Gemini 2.5: Google's most advanced multimodal AI model
WordPress Integration
- Gutenberg Support: Native block editor integration with sidebar panel
- Classic Editor: Full compatibility with WordPress Classic Editor
- Natural Language Chat: Interactive chat interface powered by WordPress Abilities API
- Secure API Management: Server-side API calls with encrypted credential storage
📋 Requirements
- WordPress 6.5 or later
- PHP 7.4 or later
- At least one supported LLM provider API key
⚡ Quick Start
1. Installation
- Download the plugin files
- Upload to
/wp-content/plugins/simple-content-analyzer-for-llms/ - Activate the plugin through the WordPress admin panel
2. Configuration
- Navigate to Settings > Simple Content Analyzer for LLMs
- Select your preferred LLM provider
- Enter your API key securely (encrypted storage)
- Configure rate limiting and content length limits as needed
3. Usage
In Post/Page Editor:
- Open any post or page for editing
- Look for the "Content Analysis" panel in the sidebar (Gutenberg) or metabox (Classic)
- Click "Assess for LLM" to analyze your content
- Review detailed feedback and suggestions
- Use the chat interface for natural language questions
Analysis Types:
- Readability: Click "Analyze Readability" for reading level assessment
- Indexability: Click "Check AI Indexability" for LLM search optimization
- Improvements: Click "Get Improvements" for categorized suggestions
- Cross-Post: Click "Cross-Platform Optimize" for social media adaptations
🔧 Configuration
API Provider Setup
OpenAI GPT-5
- Visit OpenAI Platform
- Generate an API key
- Enter in plugin settings under "OpenAI API Key"
Anthropic Claude Sonnet 4
- Visit Anthropic Console
- Create an API key
- Enter in plugin settings under "Anthropic API Key"
Perplexity AI
- Visit Perplexity API
- Generate an API key
- Enter in plugin settings under "Perplexity API Key"
Google Gemini 2.5
- Visit Google AI Studio
- Create an API key
- Enter in plugin settings under "Gemini API Key"
Security Settings
- Rate Limiting: Configure requests per hour per user (default: 60)
- Content Length: Set maximum content length for analysis (default: 50,000 chars)
- User Permissions: Control which user roles can access analysis features
🛡️ Security Features
- Encrypted API Key Storage: All credentials encrypted using WordPress security functions
- Server-Side Processing: No API keys exposed to client-side JavaScript
- Nonce Protection: All AJAX requests protected with WordPress nonces
- Capability Checks: Proper user permission validation throughout
- Input Sanitization: All user input sanitized and validated
- Rate Limiting: Prevents API abuse and quota exhaustion
🧪 Testing & QA
Unit Tests
- Provider class instantiation and method calls
- API request formatting validation
- Response parsing accuracy
- Error handling coverage
Integration Tests
- Full workflow testing with live API calls
- WordPress editor integration testing
- Multi-provider switching validation
- Chat interface functionality
Security Tests
- API key exposure prevention
- Input sanitization validation
- Permission bypass attempts
- CSRF protection verification
Performance Tests
- Response time optimization
- Rate limiting effectiveness
- Memory usage monitoring
- Concurrent request handling
🔍 Troubleshooting
Common Issues
"API Key Invalid" Error
- Verify API key is correctly entered in settings
- Check that the key has appropriate permissions
- Ensure rate limits haven't been exceeded
"Request Failed" Error
- Check internet connectivity
- Verify API service status
- Review rate limiting settings
- Check content length limits
Analysis Not Loading
- Clear browser cache
- Check JavaScript console for errors
- Verify user has required permissions
- Test with different content lengths
Chat Not Responding
- Ensure WordPress Abilities API is enabled
- Check provider API status
- Verify chat history isn't corrupted
- Test with simple queries first
Debug Mode
Enable WordPress debug mode to see detailed error logs:
// Add to wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Check /wp-content/debug.log for plugin-specific errors.
API Status Checking
Use the built-in connection test in plugin settings to verify:
- API key validity
- Provider service availability
- Network connectivity
- Request/response formatting
🔗 WordPress Abilities API Integration
The plugin registers the following abilities for natural language interaction:
analyze_content_readability: Analyze content readabilityanalyze_content_indexability: Check LLM/AI search optimizationget_content_improvements: Get categorized improvement suggestionsoptimize_cross_platform: Generate platform-specific adaptations
Example Chat Queries
- "How can I make this content more readable?"
- "What should I change to improve AI search visibility?"
- "Give me suggestions for better engagement"
- "How should I adapt this for Twitter?"
🏗️ Developer Information
Adding New LLM Providers
- Create new provider class extending
SCAFLLM_Provider_Base - Implement required interface methods:
init_provider()analyze_content()handle_chat()test_connection()
- Add provider to settings dropdown
- Update conditional loading in main plugin file
Hooks and Filters
Actions
scafllm_before_analysis: Fired before content analysisscafllm_after_analysis: Fired after analysis completionscafllm_provider_switched: When user changes provider
Filters
scafllm_sanitize_content: Modify content before API requestscafllm_analysis_results: Filter analysis results before displayscafllm_rate_limit_exceeded: Customize rate limit messages
File Structure
simple-content-analyzer-for-llms/
├── simple-content-analyzer-for-llms.php # Main plugin file
├── inc/
│ ├── interfaces/
│ │ └── interface-llm-provider.php # Provider interface
│ └── classes/
│ ├── class-settings.php # Settings management
│ ├── class-api-manager.php # API routing
│ ├── class-editor-integration.php # WordPress editor integration
│ ├── class-abilities-handler.php # Abilities API integration
│ ├── class-ajax-handler.php # AJAX request handling
│ ├── class-security.php # Security utilities
│ └── providers/
│ ├── class-provider-base.php # Abstract base class
│ ├── class-openai-provider.php # OpenAI implementation
│ ├── class-anthropic-provider.php # Anthropic implementation
│ ├── class-perplexity-provider.php # Perplexity implementation
│ └── class-gemini-provider.php # Google Gemini implementation
├── assets/
│ ├── js/ # JavaScript files
│ └── css/ # Stylesheet files
├── templates/ # Display templates
├── languages/ # Translation files
└── docs/ # Additional documentation
📄 License
This plugin is licensed under GPL v2 or later.
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes with proper testing
- Submit a pull request with detailed description
📞 Support
For support, feature requests, or bug reports:
- Check existing GitHub issues
- Create a new issue with detailed information
- Include WordPress version, PHP version, and error logs
🔄 Changelog
See CHANGELOG.md for detailed version history and updates.
Simple Content Analyzer for LLMs - Empowering WordPress content creators with AI-powered analysis and optimization tools.