WP Manifestindependent plugin directory
manifest / ai / ai-content-enhancer

AI Content Enhancer

WordPress plugin for AI-powered content enhancement - ALT text generation and featured image creation using Google Vision API and various AI image generation APIs

by Your Name · github.com/uptrend-john/ai-content-enhancer · 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/uptrend-john/ai-content-enhancer/archive/refs/heads/main.zip

AI Content Enhancer - WordPress Plugin

A comprehensive WordPress plugin that uses AI to automatically generate ALT text for images and create featured images for posts.

Features

1. Image ALT Text Scanner and Generator

  • Scans all images across your WordPress site (posts, pages, media library)
  • Identifies images with missing ALT descriptions
  • Uses Google Vision API to analyze images and generate descriptive ALT text
  • Compares existing ALT text with actual image content
  • Provides match scores and recommendations for improving ALT text
  • Bulk processing capabilities
  • Accept/Deny/Edit workflow for each suggestion

2. Featured Image Generator for Posts

  • Scans all posts to identify those without featured images
  • Analyzes post content (title, excerpt, body) to understand the topic
  • Generates relevant featured images using AI
  • Review workflow with Accept/Deny/Regenerate options
  • Automatically sets approved images as post featured images

Requirements

WordPress Requirements

  • WordPress 5.8 or higher
  • PHP 7.4 or higher
  • MySQL 5.6 or higher

PHP Extensions

  • cURL extension (for API calls)
  • GD or ImageMagick (for image processing)
  • JSON extension

Server Requirements

  • Memory limit: 128MB minimum (256MB recommended)
  • Max execution time: 60 seconds minimum
  • File upload size: 10MB minimum

Installation

Method 1: Manual Installation

  1. Download the plugin files
  2. Upload the ai-content-enhancer folder to /wp-content/plugins/
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Navigate to 'AI Content' in the WordPress admin menu
  5. Go to Settings and configure your API keys

Method 2: Upload via WordPress Admin

  1. Go to Plugins > Add New
  2. Click 'Upload Plugin'
  3. Choose the plugin zip file
  4. Click 'Install Now'
  5. Activate the plugin

API Setup

Google Vision API Setup

  1. Create a Google Cloud Project

  2. Enable the Vision API

    • Navigate to "APIs & Services" > "Library"
    • Search for "Cloud Vision API"
    • Click "Enable"
  3. Create API Credentials

    • Go to "APIs & Services" > "Credentials"
    • Click "Create Credentials" > "API Key"
    • Copy the generated API key
    • (Optional) Restrict the API key to Vision API only
  4. Configure in Plugin

    • Go to AI Content > Settings in WordPress
    • Paste your API key in the "Google Vision API Key" field
    • Click "Test Connection" to verify
    • Save settings

Image Generation API Setup

The plugin currently uses Unsplash as a fallback for image generation. For production use, you can integrate with:

Option 1: Google Imagen API (Recommended)

  • Currently in limited preview
  • Contact Google Cloud for access
  • Update the API endpoint in includes/class-image-generation-api.php

Option 2: OpenAI DALL-E API

  • Sign up at OpenAI Platform
  • Generate an API key
  • Modify the image generation class to use DALL-E endpoints

Option 3: Stable Diffusion API

  • Use services like Stability AI
  • Get API credentials
  • Update the image generation implementation

Option 4: Unsplash (Current Default)

  • Free tier available
  • Sign up at Unsplash Developers
  • Get an access key
  • Update the access key in includes/class-image-generation-api.php

Usage Guide

ALT Text Scanner

  1. Scan Your Site

    • Navigate to AI Content > ALT Text Scanner
    • Click "Scan Site for Images"
    • Wait for the scan to complete
  2. Process Images

    • Click "Process" on individual images to analyze them
    • Or click "Process All Pending" to analyze all at once
    • The AI will generate suggested ALT text
  3. Review and Apply

    • Review the suggested ALT text
    • Edit if needed
    • Click "Accept" to apply or "Deny" to skip
    • Use "Apply All Suggestions" for bulk application
  4. Compare Existing ALT Text

    • Images with existing ALT text show a match score
    • Green (70%+): Good match
    • Yellow (40-69%): Partial match
    • Red (<40%): Poor match
    • Review recommendations for improvements

Featured Image Generator

  1. Scan Posts

    • Navigate to AI Content > Featured Images
    • Click "Scan Posts"
    • The plugin finds posts without featured images
  2. Generate Images

    • Click "Generate Image" on individual posts
    • Or use "Generate All" for batch processing
    • Wait for images to be generated
  3. Review and Apply

    • Preview the generated image
    • Click "Accept & Apply" to set as featured image
    • Click "Deny" to skip
    • Click "Regenerate" to create a different image
  4. Bulk Operations

    • Use "Apply All Generated" to set all generated images at once

Dashboard

The dashboard provides:

  • Statistics for both features
  • Quick action buttons
  • Recent activity log
  • Overview of processing status

Configuration Options

Settings Page (AI Content > Settings)

API Configuration

  • Google Vision API Key: Your Google Cloud Vision API key
  • Image Generation API Key: Your image generation service API key

Processing Options

  • Batch Size: Number of items to process at once (1-100)
  • Confidence Threshold: Minimum confidence for auto-apply (0.0-1.0)
  • Auto-Apply High Confidence: Automatically apply suggestions above threshold
  • Enable Logging: Keep logs of all processing activities

API Costs and Usage

Google Vision API Pricing

Free Tier

  • First 1,000 units per month: FREE

Paid Tier

  • 1,001 - 5,000,000 units: $1.50 per 1,000 units
  • 5,000,001+ units: $0.60 per 1,000 units

What counts as a unit?

  • Each image analysis = 1 unit
  • Label detection, web detection, etc. each count separately

Cost Examples

  • 100 images: FREE
  • 1,000 images: FREE
  • 10,000 images: ~$13.50
  • 100,000 images: ~$150

Image Generation API Pricing

Varies by provider:

Unsplash (Current Default)

  • Free tier: 50 requests per hour
  • No cost for basic usage

DALL-E (OpenAI)

  • $0.020 per image (1024×1024)
  • $0.018 per image (512×512)

Stable Diffusion

  • Varies by provider
  • Typically $0.002-0.01 per image

Database Structure

The plugin creates three custom tables:

wp_aice_alt_text_queue

Stores images pending ALT text processing

  • id: Primary key
  • attachment_id: WordPress attachment ID
  • image_url: Image URL
  • current_alt_text: Existing ALT text
  • suggested_alt_text: AI-generated suggestion
  • confidence_score: AI confidence (0-1)
  • comparison_score: Match score for existing ALT
  • status: pending/processed/applied/denied
  • processed_date: When processed
  • created_date: When added to queue

wp_aice_featured_image_queue

Stores posts pending featured image generation

  • id: Primary key
  • post_id: WordPress post ID
  • post_title: Post title
  • post_excerpt: Post excerpt
  • generated_image_url: Generated image URL
  • attachment_id: WordPress attachment ID after upload
  • status: pending/generated/applied/denied
  • generation_prompt: Prompt used for generation
  • processed_date: When processed
  • created_date: When added to queue

wp_aice_logs

Activity logs

  • id: Primary key
  • log_type: success/error/scan
  • message: Log message
  • data: Additional data (JSON)
  • created_date: When logged

Security Features

  • Nonce Verification: All AJAX requests verified with WordPress nonces
  • Capability Checks: Only administrators can access plugin features
  • Data Sanitization: All user inputs sanitized before processing
  • SQL Injection Prevention: Prepared statements for all database queries
  • XSS Protection: Output escaped before display
  • API Key Security: Keys stored in WordPress options (encrypted recommended)

Performance Optimization

Batch Processing

  • Process multiple items at once
  • Configurable batch size
  • Prevents timeout issues

Caching

  • Processed results cached in database
  • Avoid re-processing same images
  • Reduces API costs

Background Processing

  • Long-running tasks handled asynchronously
  • Doesn't block WordPress admin
  • Progress tracking available

Troubleshooting

Common Issues

"API key is not configured"

  • Solution: Add your API key in Settings page
  • Test connection to verify

"Failed to download image"

  • Solution: Check image URL accessibility
  • Verify server can make external requests
  • Check firewall settings

"Timeout error"

  • Solution: Reduce batch size in settings
  • Increase PHP max_execution_time
  • Process items individually

"Memory limit exceeded"

  • Solution: Increase PHP memory_limit
  • Process fewer items at once
  • Optimize images before processing

"Permission denied"

  • Solution: Check user capabilities
  • Verify user is administrator
  • Check file permissions

Debug Mode

Enable WordPress debug mode to see detailed errors:

// In wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Check logs in /wp-content/debug.log

Uninstallation

Keep Data

Simply deactivate the plugin from Plugins page

Remove All Data

  1. Deactivate the plugin
  2. Delete the plugin files
  3. Manually remove database tables if needed:
    DROP TABLE IF EXISTS wp_aice_alt_text_queue;
    DROP TABLE IF EXISTS wp_aice_featured_image_queue;
    DROP TABLE IF EXISTS wp_aice_logs;
  4. Remove plugin options:
    DELETE FROM wp_options WHERE option_name = 'aice_settings';

Support and Documentation

Getting Help

  • Check the troubleshooting section
  • Review API documentation
  • Check WordPress debug logs
  • Contact plugin support

Useful Links

Changelog

Version 1.0.0

  • Initial release
  • ALT text scanner and generator
  • Featured image generator
  • Google Vision API integration
  • Unsplash fallback for image generation
  • Bulk processing capabilities
  • Admin dashboard and statistics
  • Activity logging

License

GPL v2 or later

Credits

Developed by NinjaTech AI Team Uses Google Cloud Vision API Unsplash API for image generation fallback

Future Enhancements

  • Support for additional AI providers
  • Automated scheduling for scans
  • Multi-language support
  • Custom prompt templates
  • Image style preferences
  • Integration with popular page builders
  • REST API endpoints
  • WP-CLI commands
  • Export/import functionality
  • Advanced filtering and search