WP Manifestindependent plugin directory
manifest / ai / tf-ai-content-optimizer

AI Content Optimizer (PT-PT)

Rewrites and optimizes PT-PT product and post content using OpenAI. Integrates with Yoast and RankMath.

by this.functional · github.com/thisfunctional/tf-ai-content-optimizer

★ 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/thisfunctional/tf-ai-content-optimizer/archive/refs/heads/main.zip

WordPress plugin for rewriting and optimizing product & post content in European Portuguese using OpenAI. Designed to integrate smoothly with WooCommerce, Yoast SEO, and RankMath.

✨ Features

  • AI-generated long descriptions (PT-PT) using product/post data
  • SEO metadata generation
    • Meta Title (≤60 chars)
    • Meta Description (140–155 chars)
    • 3 slug suggestions (JSON format)
  • Custom tone control via Settings (supports detailed instructions)
  • Glossary-based term replacement (preferred terms)
  • Blocked words list (avoid unwanted terms)
  • Yoast & RankMath integration
    • Writes _yoast_wpseo_title, _yoast_wpseo_metadesc, rank_math_title, rank_math_description
  • Safe manual apply workflow
    (Generate → Preview → Apply)
  • Synchronous AJAX UI with clean loading state
  • Works in products and posts

📂 Folder Structure

tf-ai-content-optimizer/
├── tf-ai-content-optimizer.php
└── includes/
    └── class-tfai-optimizer.php

⚙️ Requirements

  • WordPress 6.0+
  • PHP 7.4+ (recommended 8.0+)
  • WooCommerce (optional)
  • Yoast SEO or RankMath (optional)
  • OpenAI API key
  • Outbound HTTPS allowed (api.openai.com)

🧰 Installation

  1. Download or clone this repository into:
    wp-content/plugins/tf-ai-content-optimizer
  2. Activate the plugin in Plugins → Installed Plugins
  3. Go to AI Optimizer → Settings
  4. Enter:
    • OpenAI API key
    • Model (recommended: gpt-4o-mini)
    • Tone configuration
    • Glossary & banned terms (optional)

🚀 Usage

1. Edit any Product or Post

A side metabox appears for AI content optimization.

2. Click “Gerar sugestões AI”

The plugin sends relevant product/post data to OpenAI:

  • Title
  • Current description
  • Attributes (WooCommerce)
  • Taxonomies
  • ACF fields
  • Your tone, glossary & banned terms

3. Review the AI Preview

The preview includes:

  • AI Meta Title
  • AI Meta Description
  • AI Long Description

Nothing is applied yet.

4. Click “Aplicar aos campos”

This writes:

  • Long description → post_content
  • SEO metadata → Yoast / RankMath fields

🧠 OpenAI Models

Recommended:

  • gpt-4o-mini → fast + cheap
  • gpt-4o → premium quality

The plugin uses the Chat Completions API only.

🧪 Debugging

Enable WP debug log in wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

Logs appear in:

wp-content/debug.log

Common causes of issues:

  • Missing API key
  • Server blocking outbound requests
  • Long requests (90s timeout)

📌 Roadmap

  • Bulk optimization
  • Per-category tone settings
  • WPML-aware generation
  • Custom prompt profiles
  • Streaming responses

🧑‍💻 Author

this.functional Lda.
Web development & AI integrations
https://thisfunctional.pt