=== AEO Bob Lite ===
Contributors: priya108, paulrodneyturner
Donate link: https://aeobob.com
Tags: seo, aeo, ai, content-optimization, chatgpt
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.5.76
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free AEO & SEO analysis for WordPress. Optimize your content for AI search engines like ChatGPT, Claude, and Perplexity. Get instant scores and hints.

== Description ==

**AEO Bob Lite** brings Answer Engine Optimization (AEO) to WordPress - completely free! As AI assistants like ChatGPT, Claude, and Perplexity become primary information sources, traditional SEO alone isn't enough. AEO Bob Lite helps you optimize for both search engines AND AI systems.

= Why AEO Matters =

* **100+ million daily users** rely on AI assistants for answers
* **AI recommendations** are replacing traditional search results
* **Content not optimized for AI** becomes invisible to millions
* **Dual optimization** needed: Google rankings AND AI discoverability

= Features =

**Free AEO & SEO Scoring**
* Instant AEO (Answer Engine Optimization) scores
* Traditional SEO scoring with detailed breakdowns
* Real-time analysis as you edit

**Actionable Hints**
* Clear improvement recommendations
* Question-answer format suggestions
* Structure optimization tips

**Post List Integration**
* See AEO & SEO scores in post/page lists
* Sortable columns with color-coded badges
* Quick identification of content needing work

**Editor Support**
* Works with Classic Editor, Block Editor (Gutenberg), and Elementor
* Scores visible while editing
* One-click content analysis
* Improvement hints in sidebar

**100% Free Core Features**
* No API keys required for basic analysis
* All core analysis done locally
* No usage limits on scoring

= How It Works =

1. **Install** AEO Bob Lite
2. **Edit** any post or page
3. **Click** "Analyze Content" in the sidebar
4. **Review** your AEO & SEO scores plus hints
5. **Optimize** based on recommendations

= What Gets Analyzed =

**AEO Score (0-100)**: Question-answer format, direct answers, content structure, readability, entity coverage, snippet-friendly formatting

**SEO Score (0-100)**: Title optimization, meta description, keyword usage, heading structure, content length, internal/external links

= Want More? =

Upgrade to **AEO Bob Pro** for AI-powered suggestions, one-click apply, voice preservation, analytics, and bulk operations. [Learn more](https://aeobob.com/pricing/)

= Requirements =

* WordPress 5.0+
* PHP 7.4+

== Installation ==

= Automatic Installation =

1. Go to Plugins → Add New
2. Search for "AEO Bob Lite"
3. Click "Install Now" then "Activate"
4. That's it! The plugin includes all necessary components.

= Manual Installation =

1. Download the plugin ZIP file
2. Go to Plugins → Add New → Upload Plugin
3. Choose the ZIP file and click "Install Now"
4. Activate the plugin
5. All necessary components are bundled - no additional downloads needed

= Getting Started =

1. After activation, go to **AEO Bob** in your WordPress admin menu
2. Read the "How to Use" guide on the dashboard
3. Edit any post or page
4. Find the "AEO Bob - Content Analysis" meta box in the sidebar
5. Click "Analyze Content" to get your scores
6. Review the improvement hints and optimize your content

== Frequently Asked Questions ==

= Do I need an API key? =

No! AEO Bob Lite is completely free and doesn't require any API keys. All analysis is done locally on your WordPress site.

= What's the difference between Lite and Pro? =

**Lite (Free):**
* AEO & SEO scoring (unlimited)
* Improvement hints
* Post list integration
* AI-powered suggestions via your own OpenAI API key
* One-click apply (unlimited)
* 100% free, no usage limits

**Pro (Paid — separate plugin at aeobob.com):**
* Everything in Lite, plus:
* Multiple AI providers: OpenAI, Anthropic (Claude), Google Gemini, Perplexity, DeepSeek
* More AI suggestions per post (6–10 vs 3 in Lite)
* Author voice AI — deep style matching
* Bulk operations — optimize multiple posts at once
* Advanced analytics and trend tracking
* Priority support

[Compare plans](https://aeobob.com/pricing/)

= Does this work with Gutenberg? =

Yes! AEO Bob Lite works with both the Gutenberg (Block Editor) and Classic Editor.

= Will this slow down my site? =

No. AEO Bob Lite only runs when you click the "Analyze" button. It doesn't affect your frontend performance or page load times.

= Can I use this with other SEO plugins? =

Absolutely! AEO Bob Lite works alongside Yoast SEO, Rank Math, All in One SEO, and other SEO plugins.

= What is AEO (Answer Engine Optimization)? =

AEO is optimization for AI search engines and assistants like ChatGPT, Claude, Perplexity, and Gemini. It focuses on making your content easy for AI systems to understand, cite, and recommend.

= Where can I get support? =

* Free users: [WordPress.org Support Forum](https://wordpress.org/support/plugin/aeo-bob-lite/)
* Pro users: Priority support at [aeobob.com/support](https://aeobob.com/support/)

== Screenshots ==

1. AEO & SEO scores displayed in post list with color-coded badges
2. Content analysis meta box in post editor with scores and hints
3. Dashboard showing site-wide statistics
4. Improvement hints with actionable recommendations
5. Upgrade page comparing Lite vs Pro features

== Changelog ==

= 1.5.76 - 2026-03-03 =
* Documentation: Added readme disclosure for Anthropic, Google Gemini, Perplexity, and Cohere APIs (code paths exist in shared SEO analyzer; Lite uses OpenAI only). Each service now has Terms and Privacy Policy links per WP.org external-service requirements.

= 1.5.75 - 2026-03-03 =
* Compliance: Removed all trialware/locked-feature code and copy per WP.org Guideline 5
* Removed: Elementor panel limit counter, preview mode UI, remainingOptimizations, isLimitReached
* Removed: Optimizer stubs (has_reached_post_limit, get_optimized_count, mark_post_optimized, is_post_optimized)
* Removed: Preview-mode i18n strings (previewModeActive, previewModeDesc, upgradeUnlimited, etc.)
* Fixed: Upgrade page tagline no longer implies Lite lacks one-click apply
* Compliance: Removed development markdown files from plugin root (DEVELOPMENT-NOTES-LITE, LITE-TO-PRO-IMPROVEMENTS, LITE-FEATURES-TO-PORT, REVIEWER_REPLY, OWNERSHIP, DEV_NOTES)

= 1.5.74 - 2026-02-26 =
* Compliance: Removed 3-post one-click apply limit — all AI features fully available per WP.org Guideline 5
* Compliance: Removed Anthropic, Gemini, Perplexity, and Cohere from External Services disclosure (those providers are only in the separate AEO Bob Pro plugin; Lite only uses OpenAI)
* Accuracy: Corrected Lite vs Pro feature comparison table — AI suggestions and one-click apply now correctly shown as available in Lite
* Accuracy: Updated plugin description and FAQ to accurately reflect Lite capabilities
* Accuracy: Author URI updated to reflect plugin ownership

= 1.5.73 - 2026-02-09 =
* Enhancement: Synced enhanced scoring algorithm from Pro v2.3.09
* Enhancement: AEO score now uses gradient FAQ detection (4 methods instead of binary)
* Enhancement: SEO score now uses gradient scoring for all factors (more achievable 90+ scores)
* Enhancement: Question headings (H2-H4 ending with ?) now detected for AEO scoring
* Enhancement: Multiple schema meta keys checked (supports Yoast, AIOSEO, Rank Math)
* Enhancement: Better internal link detection (absolute, relative, and simple relative URLs)
* Enhancement: More answer-focused content patterns detected (5 patterns vs 3)
* Technical: Word count scoring now has 6-7 tiers instead of 3-4

= 1.5.72 - 2026-02-02 =
* Security: Enhanced inline documentation explaining security model in Elementor integration
* Security: Improved JSON handling comments explaining why decode happens before sanitization
* Compliance: Clearer security documentation for WordPress.org review
* Technical: No logic changes - documentation and comments only

= 1.5.71 - 2026-02-02 =
* Security: Removed all $_GET['post'] usage - now uses global $post for safe post ID retrieval
* Compliance: Refined External Services section with specific API endpoints per wp.org requirements
* Compliance: Documented exact URLs for Anthropic, Perplexity, Cohere, and Google Gemini APIs
* Packaging: Removed markdown files from plugin distribution (dev docs kept in repo only)
* Technical: Elementor and admin enqueue now use global $post instead of URL parameters

= 1.5.70 - 2025-02-02 =
* Security: Added permission validation in Elementor integration (current_user_can check)
* Security: Improved JSON input sanitization in AJAX handlers with strict validation
* Compliance: Comprehensive External Services documentation for WordPress.org reviewer
* Compliance: Documented all AI providers (OpenAI, Anthropic, Google Gemini, Perplexity, Cohere)
* Compliance: Added data transmission disclosure per WordPress.org guidelines

= 1.5.69 - 2025-01-09 =
* Fixed: CRITICAL - Sidebar scores now display immediately on first ANALYZE click
* Fixed: Added normalizeScores() helper to handle both API response shapes
* Fixed: renderSidebarState() now explicitly called after successful analysis
* Fixed: ANALYZE button now correctly becomes OPTIMIZE button without requiring post save
* Technical: Surgical fix for score display - no changes to other functionality

= 1.5.68 - 2025-01-09 =
* Fixed: CRITICAL - jQuery closure scope issue preventing ALL event handlers from executing
* Fixed: Re-capture window.jQuery at the START of every function that uses jQuery
* Fixed: handleAnalyze(), handleReanalyze(), handleRescore() now use fresh jQuery instance
* Fixed: All helper functions (updateSidebarScores, getCurrentScores, etc.) now re-capture jQuery
* Technical: Event handlers were binding successfully but executing with stale jQuery reference
* Technical: Functions inherited closure-captured $ which became orphaned after WordPress jQuery Migrate replaced global instance

= 1.5.67 - 2025-01-09 =
* Fixed: CRITICAL - Event handlers not binding due to jQuery instance mismatch
* Fixed: Re-capture window.jQuery inside bindEvents() to ensure correct instance
* Fixed: Added defensive checks to verify jQuery availability before binding
* Added: Console logging to trace init() and bindEvents() execution
* Added: "Events bound successfully" confirmation log
* Technical: WordPress jQuery Migrate was replacing jQuery after initialization

= 1.5.66 - 2025-01-08 =
* Fixed: CRITICAL - Active jQuery polling to handle async/delayed jQuery loading
* Fixed: Script now waits up to 5 seconds for jQuery to become available
* Fixed: Handles WordPress configurations where jQuery loads after our script
* Added: 50ms polling interval to detect when jQuery becomes available
* Added: Console logging showing when jQuery is found and initialization begins
* Technical: Completely rewrote initialization to actively wait for jQuery

= 1.5.65 - 2025-01-08 =
* Fixed: CRITICAL - jQuery initialization timing issue preventing event handlers
* Fixed: Added proper jQuery ready wrapper to ensure $ is available
* Fixed: Event handlers now bind correctly on all WordPress configurations
* Added: jQuery availability checks before initialization
* Added: Error logging if jQuery not available
* Technical: Wrapped initialization in both document.ready and jQuery ready check

= 1.5.64 - 2025-01-08 =
* Fixed: CRITICAL - Reverted to pre-v1.5.56 working code for sidebar updates
* Fixed: Sidebar scores now appear immediately on first ANALYZE (restored v1.5.50 behavior)
* Fixed: ANALYZE button now transitions to OPTIMIZE correctly on first click
* Removed: Complex Promise-based approach that caused silent failures
* Restored: Simple, reliable direct DOM updates with slideDown animation
* Technical: Reverted to proven working code while keeping error logging

= 1.5.63 - 2025-01-08 =
* Fixed: Critical syntax error preventing sidebar UI updates after ANALYZE
* Fixed: Added .catch() and .finally() to Promise chain for proper error handling
* Fixed: Button state now always resets even if Promise fails
* Added: Comprehensive console logging to trace execution flow
* Added: Fallback update mechanism if waitForSidebarElements() fails
* Technical: Promise chain now properly handles all success/error/completion cases

= 1.5.62 - 2025-01-08 =
* Fixed: Sidebar scores now appear immediately on first ANALYZE click (DOM timing fix)
* Fixed: ANALYZE button now transitions to OPTIMIZE button reliably on initial load
* Added: waitForSidebarElements() utility to ensure DOM readiness before updates
* Improved: More defensive visibility forcing with .css('display', 'block')
* Technical: Prevents race condition where AJAX response returns before metabox fully renders

= 1.5.61 - 2025-01-08 =
* Fixed: Sidebar score visibility now reliably updates on first ANALYZE click (selector scoping fix)
* Fixed: Score container visibility selectors now properly scoped to .aeo-bob-scores-sidebar
* Improved: Consistent jQuery selector scoping prevents DOM targeting issues
* Technical: All sidebar visibility toggles now use scoped selectors for reliability

= 1.5.60 - 2025-01-07 =
* Fixed: Sidebar now displays existing scores immediately on initial page load (no more "No scores yet" bug)
* Fixed: Sidebar button state (ANALYZE vs OPTIMIZE) now updates correctly when scores exist
* Fixed: Unified state management ensures consistent UI regardless of load timing
* Added: renderSidebarState() function for reliable state transitions
* Improved: Better initialization timing with score container check
* Improved: All state transitions now consistent and reliable

= 1.5.59 - 2025-01-07 =
* Fixed: Sidebar scores now display immediately after first ANALYZE click (no post save required)
* Fixed: Analyze button properly transitions to OPTIMIZE button after first analysis
* Fixed: FAQ copy instructions no longer included when selecting FAQ content
* Improved: Better score container visibility management (removed conflicting show/slideDown calls)
* Enhanced: Added defensive element checks before jQuery operations
* Enhanced: Added conditional debug logging (WP_DEBUG only)

= 1.5.58 - 2025-01-07 =
* Improved: FAQ suggestions in manual mode now display as editor-ready content (no HTML)
* Removed: "Copy HTML" buttons for cleaner FAQ display
* Enhanced: FAQ blocks now show Q:/A: format ready for direct copy/paste into Visual editor
* UX: Clear visual indication that FAQ content can be selected and copied

= 1.5.57 - 2025-01-07 =
* Fixed: Analyze failures now fallback to displaying last saved scores (no blank screen on error)
* Improved: FAQ suggestions now formatted as clean h3/p HTML blocks with copy button
* Improved: More robust Gutenberg editor content detection with error handling
* UX: When analysis fails, UI shows "Showing last saved scores" message

= 1.5.56 - 2025-01-07 =
* Fixed: Scores now display immediately on initial page load (no need to save post first)
* Fixed: Analyze button works reliably on first click (added post ID validation and fallback)
* Fixed: Inline error messages now display in metabox (not just console/alert)
* Improved: Robust initialization with retry logic (handles timing issues in WordPress admin)
* Added: New AJAX endpoint to fetch existing scores without re-analyzing

= 1.5.55 - 2025-01-07 =
* Fixed: Score selectors now use data attributes consistently (no more position-based .eq() selectors)
* Fixed: getCurrentScores() now correctly reads from sidebar, not optimization panel
* Fixed: Optimization panel scores now update immediately after ANALYZE (not just on page reload)
* Fixed: Both sidebar and panel scores stay perfectly in sync
* Improved: More specific DOM selectors prevent selector conflicts between sidebar and panel

= 1.5.54 - 2025-01-06 =
* Fixed: Sidebar meta box now always displays saved scores on page load
* Improved: Optimization panel score styling with high-contrast white text on gradient
* Enhanced: JavaScript score update selectors for more reliable DOM targeting
* Accessibility: Improved readability of score displays throughout the plugin

= 1.5.53 - 2025-01-06 =
* Removed: Debug logging (error_log, var_export) for WordPress.org compliance
* Improved: Production-clean code without development functions
* Maintained: All ANALYZE functionality and error handling intact

= 1.5.52 - 2025-01-06 =
* Fixed: Enhanced AJAX error handling with detailed diagnostics
* Fixed: Added WP_DEBUG-aware logging for troubleshooting ANALYZE issues
* Fixed: Improved error messages with HTTP status codes and actionable guidance
* Fixed: Explicitly defined ajaxUrl to prevent undefined variable issues
* Improved: Better visibility when analysis fails (console logging + user-friendly alerts)

= 1.5.51 - 2025-01-06 =
* Packaging: Removed all hidden and OS files from distribution (.DS_Store, dotfiles)
* Packaging: Distribution ZIP now contains ONLY WordPress.org-approved files
* Improved: Clean package with comprehensive file exclusions for WP.org compliance

= 1.5.50 - 2025-01-06 =
* Fixed: Sidebar scores now display correctly after first ANALYZE (no more blank scores)
* Fixed: Score DOM elements always rendered to prevent JavaScript update failures
* Fixed: Local analysis works independently of optimization credits
* Improved: More reliable first-time user experience

= 1.5.49 - 2025-01-05 =
* Added: DEVELOPMENT-NOTES.md for contributor guidance and architectural documentation
* Added: .gitignore for repository hygiene
* Changed: Cleaned up readme.txt changelog for clarity
* Docs: Established clean baseline for WordPress.org submission

= 1.5.48 - 2025-01-04 =
* Fixed: All WordPress.org Plugin Check issues resolved
* Fixed: Added translator comments for i18n placeholders
* Fixed: Ordered placeholders for proper translation
* Fixed: PHPCS ignores for database queries with proper justification
* Fixed: Variable prefix compliance

= 1.5.47 - 2025-12-11 =
* Security: WordPress.org Plugin Check compliance
* Compatibility: Tested up to WordPress 6.9
* Refactored: Database queries use inline $wpdb->prepare()
* Security: Table names escaped with esc_sql()

= 1.5.26 - 2025-12-05 =
* Added: Elementor integration with native sidebar panel
* Fixed: Script loading moved to admin_enqueue_scripts
* Fixed: Optimization panel JavaScript reliability

= 1.5.21 - 2025-12-05 =
* Security: Fixed input sanitization
* Compliance: All WordPress.org security issues resolved

= 1.0.0 - 2024-11-01 =
* Initial release of AEO Bob Lite

== Upgrade Notice ==

= 1.5.56 =
Critical fix: Scores now load immediately on page open. Analyze button works on first click. Improved error handling.

= 1.5.55 =
Critical fix: Scores now update correctly in both sidebar and optimization panel after ANALYZE. Improved selector reliability.

= 1.5.54 =
Improved score display readability and reliability. Sidebar scores now always display saved scores correctly.

= 1.5.51 =
Clean packaging release: All hidden and OS files removed from distribution. WordPress.org compliant package.

= 1.5.50 =
Critical fix: Sidebar scores now display correctly after first ANALYZE. Improved first-time user experience.

= 1.5.49 =
Clean baseline with comprehensive developer documentation. Recommended for all users preparing for WordPress.org submission.

= 1.5.48 =
Plugin Check compliance: All WordPress.org Plugin Check issues fixed. Recommended update.

= 1.0.0 =
Initial release of AEO Bob Lite. Get free AEO & SEO scores for your WordPress content!

== External Services ==

This plugin optionally connects to OpenAI when you use AI-powered suggestion features. The core ANALYZE feature (AEO/SEO scoring) works 100% locally with no external calls.

= OpenAI API =

Endpoint: https://api.openai.com/v1/chat/completions
Used for: Generating AI-powered content suggestions and author voice analysis.
Data sent: Post title and content text only. No personal data is transmitted.
When sent: Only when you click "Analyze Voice" or "Get AI Suggestions" — never automatically.
Requires: Your own OpenAI API key, entered in AEO Bob → Settings. The plugin developer never receives or stores your key.
Terms: https://openai.com/terms
Privacy: https://openai.com/privacy

= Anthropic API (Claude) =

Endpoint: https://api.anthropic.com/v1/messages
Used for: Optional AI-powered SEO suggestions (available only when AEO Bob Pro is installed; Lite does not call this).
Data sent: Content analysis summary (word count, headings, keyword density, etc.) — only when user requests SEO suggestions and Pro is active.
When sent: Only on explicit user action when Pro is installed and configured.
Requires: User's own Anthropic API key (Pro only).
Terms: https://www.anthropic.com/legal/consumer-terms
Privacy: https://www.anthropic.com/legal/privacy

= Google Gemini API =

Endpoint: https://generativelanguage.googleapis.com/v1/models/...
Used for: Optional AI-powered SEO suggestions (available only when AEO Bob Pro is installed; Lite does not call this).
Data sent: Content analysis summary — only when user requests SEO suggestions and Pro is active.
When sent: Only on explicit user action when Pro is installed and configured.
Requires: User's own Google API key (Pro only).
Terms: https://ai.google.dev/terms
Privacy: https://policies.google.com/privacy

= Perplexity API =

Endpoint: https://api.perplexity.ai/chat/completions
Used for: Optional AI-powered SEO suggestions (available only when AEO Bob Pro is installed; Lite does not call this).
Data sent: Content analysis summary — only when user requests SEO suggestions and Pro is active.
When sent: Only on explicit user action when Pro is installed and configured.
Requires: User's own Perplexity API key (Pro only).
Terms: https://www.perplexity.ai/site/terms
Privacy: https://www.perplexity.ai/site/privacy

= Cohere API =

Endpoint: https://api.cohere.ai/v1/chat
Used for: Optional AI-powered SEO suggestions (available only when AEO Bob Pro is installed; Lite does not call this).
Data sent: Content analysis summary — only when user requests SEO suggestions and Pro is active.
When sent: Only on explicit user action when Pro is installed and configured.
Requires: User's own Cohere API key (Pro only).
Terms: https://cohere.com/terms-of-use
Privacy: https://cohere.com/privacy

= Summary =

* AEO Bob Lite calls only the OpenAI API. Anthropic, Google Gemini, Perplexity, and Cohere are documented above because their code paths exist in shared files; Lite never invokes them. AEO Bob Pro (separate plugin) enables those providers when installed.
* Data is NEVER sent automatically — only on explicit user action
* Only post title and content text are transmitted — never passwords, emails, or personal data
* You must provide and manage your own OpenAI API key
* The ANALYZE feature (AEO/SEO scoring) works entirely locally with zero external connections

== Privacy Policy ==

AEO Bob Lite performs all AEO/SEO scoring locally on your WordPress server — no external connections are made for the free analysis features. When you optionally use the AI suggestion features (Analyze Voice, Get AI Suggestions), your post title and content text are sent to the OpenAI API using your own API key. No personal user data is collected or transmitted by the plugin. The plugin developer (AEO Bob / Master22 Solutions) never receives your content or API key. See the External Services section for full details.

== Credits ==

Developed by the AEO Bob Team
Website: https://aeobob.com
Support: https://aeobob.com/support/
