WP Manifestindependent plugin directory
manifest / ai / simple-content-analyzer-for-llms

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

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/dr-robert-li/simple-content-analyzer-for-llms/archive/refs/heads/main.zip

Readme

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

  1. Download the plugin files
  2. Upload to /wp-content/plugins/simple-content-analyzer-for-llms/
  3. Activate the plugin through the WordPress admin panel

2. Configuration

  1. Navigate to Settings > Simple Content Analyzer for LLMs
  2. Select your preferred LLM provider
  3. Enter your API key securely (encrypted storage)
  4. Configure rate limiting and content length limits as needed

3. Usage

In Post/Page Editor:

  1. Open any post or page for editing
  2. Look for the "Content Analysis" panel in the sidebar (Gutenberg) or metabox (Classic)
  3. Click "Assess for LLM" to analyze your content
  4. Review detailed feedback and suggestions
  5. 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

  1. Visit OpenAI Platform
  2. Generate an API key
  3. Enter in plugin settings under "OpenAI API Key"

Anthropic Claude Sonnet 4

  1. Visit Anthropic Console
  2. Create an API key
  3. Enter in plugin settings under "Anthropic API Key"

Perplexity AI

  1. Visit Perplexity API
  2. Generate an API key
  3. Enter in plugin settings under "Perplexity API Key"

Google Gemini 2.5

  1. Visit Google AI Studio
  2. Create an API key
  3. 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 readability
  • analyze_content_indexability: Check LLM/AI search optimization
  • get_content_improvements: Get categorized improvement suggestions
  • optimize_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

  1. Create new provider class extending SCAFLLM_Provider_Base
  2. Implement required interface methods:
    • init_provider()
    • analyze_content()
    • handle_chat()
    • test_connection()
  3. Add provider to settings dropdown
  4. Update conditional loading in main plugin file

Hooks and Filters

Actions

  • scafllm_before_analysis: Fired before content analysis
  • scafllm_after_analysis: Fired after analysis completion
  • scafllm_provider_switched: When user changes provider

Filters

  • scafllm_sanitize_content: Modify content before API request
  • scafllm_analysis_results: Filter analysis results before display
  • scafllm_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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with proper testing
  4. Submit a pull request with detailed description

📞 Support

For support, feature requests, or bug reports:

  1. Check existing GitHub issues
  2. Create a new issue with detailed information
  3. 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.

Read the full README on GitHub →