=== SpamBanana - AI Spam Protection ===
Contributors: famaserver
Tags: spam, comments, antispam, spam protection, ai
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered spam detection for WordPress. Accuracy improves over time, reaching up to 99% with feedback. No CAPTCHA required!

== Description ==

SpamBanana uses advanced Machine Learning (Logistic Regression + TF-IDF) to detect spam comments. Accuracy improves over time with admin feedback, reaching up to 99% after 2M feedbacks. No annoying CAPTCHAs needed!

= Features =

* AI-Powered Detection with Machine Learning
* Accuracy improves over time (up to 99% with feedback)
* Real-time Dashboard with Statistics
* GeoIP Country Blocking
* Admin Feedback System to improve AI
* No CAPTCHA Required
* Fast & Lightweight
* Secure HMAC-SHA256 Authentication

= How It Works =

1. Install and activate the plugin
2. Get your free API keys from spambanana.com
3. Enter API keys in Settings
4. All comments are automatically checked
5. Provide feedback to improve AI accuracy

= Admin Feedback System =

Help improve the AI by providing feedback on spam detection:
* Mark false positives as "Not Spam"
* Mark false negatives as "Spam"
* AI learns from your feedback
* Accuracy improves over time

= GeoIP Blocking =

Block spam by country:
* Real-time IP geolocation
* Select countries to block
* Cached for performance

= Dashboard & Statistics =

* Total comments checked
* Spam blocked count
* Daily trends (7-90 days)
* Top spam sources
* Beautiful charts

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/spambanana/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Visit spambanana.com to get your free API keys
4. Go to SpamBanana → Settings and enter your API keys
5. Configure spam thresholds and actions
6. Done! Your site is now protected

== Frequently Asked Questions ==

= Is it free? =

Yes! Get your free API keys from spambanana.com.

= Does it work with other plugins? =

Yes! Works with Contact Form 7, WPForms, and all standard WordPress comments.

= Will it slow down my site? =

No! SpamBanana is lightweight and uses async API calls. Minimal performance impact.

= What happens if the API is down? =

You can configure fallback behavior: allow, block, or hold for review.

= How accurate is the spam detection? =

Accuracy improves over time with admin feedback, reaching up to 99% after 2M feedbacks. The more feedback you provide, the smarter it gets!

= Do I need technical knowledge? =

No! Simple setup in 5 minutes. Just install, get API keys, and you're protected.

= Does it use CAPTCHA? =

No! No annoying CAPTCHAs for your users. Pure AI-powered detection.

== Screenshots ==

1. Main Dashboard with Statistics
2. Settings Page with API Configuration
3. Spam Detection in Action
4. Admin Feedback Buttons
5. GeoIP Country Blocking

== Changelog ==

= 1.0.6 =
* Security: Fixed all unescaped database table names with esc_sql()
* Security: Improved database query security across all files
* Compliance: Resolved Plugin Check warnings for database operations
* Fixed: 26 security warnings related to direct database queries

= 1.0.5 =
* Added: Comprehensive external services documentation in readme
* Fixed: Nonce sanitization with sanitize_text_field for security compliance
* Improved: Detailed explanation of data transmission and privacy practices
* Compliance: WordPress Plugin Directory guidelines for external services

= 1.0.4 =
* Fixed: Comment ID not being saved to stats table (critical fix for feedback buttons)
* Fixed: Dashboard statistics now correctly display spam check data
* Added: Database index on comment_id for better performance
* Improved: Better logging for debugging comment tracking

= 1.0.3 =
* Updated: Chart.js to latest stable version 4.5.1 (local file, not CDN)
* Fixed: Dashboard statistics display issues
* Fixed: Feedback buttons not showing in comments list
* Fixed: Admin scripts loading on comments page
* Improved: Test mode now generates local spam_log_id for tracking

= 1.0.2 =
* Fixed: Accuracy description consistency in readme
* Fixed: Text domain to match plugin slug (spambanana-ai-spam-protection)
* Fixed: CSS enqueuing - moved inline styles to external file
* Fixed: JavaScript enqueuing - moved inline scripts to external files
* Updated: Chart.js to version 4.4.0 (from CDN)
* Improved: WordPress Plugin Directory compliance

= 1.0.1 =
* Fixed: Chart.js loading on dashboard
* Fixed: PHP and WordPress version requirements
* Fixed: Security escape output
* Added: Automatic version checking
* Improved: Error messages
* Improved: Chart visualization

= 1.0.0 =
* Initial release
* AI-powered spam detection
* Admin feedback system
* GeoIP blocking
* Statistics dashboard
* HMAC security

== Upgrade Notice ==

= 1.0.6 =
Critical security update: All database table names are now properly escaped. Highly recommended for all users.

= 1.0.5 =
Important compliance update: Added external services documentation and security improvements. Required for WordPress.org approval.

= 1.0.4 =
Critical fix: Feedback buttons and dashboard statistics now work correctly. Please deactivate and reactivate the plugin after update.

= 1.0.3 =
Important update: Chart.js updated to latest stable version (4.5.1, local file), dashboard and feedback buttons fixed.

= 1.0.2 =
Important update for WordPress Plugin Directory compliance. Fixes CSS/JS enqueuing and text domain issues.

= 1.0.1 =
Bug fixes and improvements. Recommended update for all users.

== External Services ==

This plugin relies on external services to provide spam detection and geolocation features. Below is detailed information about each service:

= SpamBanana API (api.spambanana.com) =

**What it does:** Analyzes comments using Machine Learning (Logistic Regression + TF-IDF) to detect spam.

**When data is sent:** Every time a comment is submitted on your WordPress site (unless the user is logged in and you've disabled checking for logged-in users).

**What data is sent:**
* Comment content (text)
* Comment author name
* Comment author email
* Comment author IP address
* Comment author website URL (if provided)
* User agent string

**Why it's needed:** WordPress servers have limited resources. By processing spam detection on our dedicated ML servers, we:
* Reduce load on your WordPress server
* Provide faster spam detection
* Use advanced Machine Learning models that would be too resource-intensive to run locally
* Continuously improve accuracy through centralized learning from millions of comments
* Reduce AI costs for users by sharing infrastructure

**Data retention:** Comment data is stored temporarily for analysis and learning. Spam detection results are kept to improve the ML model accuracy over time.

**Privacy & Terms:**
* Service Terms: https://spambanana.com/terms
* Privacy Policy: https://spambanana.com/privacy
* The service is GDPR compliant
* No personal data is sold or shared with third parties

= IP-API.com (ip-api.com) =

**What it does:** Provides geolocation data (country) based on IP addresses for the GeoIP blocking feature.

**When data is sent:** Only when GeoIP blocking is enabled in settings, and only for new IP addresses not in cache (cached for 7 days).

**What data is sent:**
* Visitor's IP address only

**Why it's needed:** To identify the country of origin for comments, allowing you to block spam from specific countries if desired.

**Privacy & Terms:**
* Service website: http://ip-api.com
* Terms of Service: https://ip-api.com/docs/legal
* This is a free service with rate limiting (45 requests per minute)

== Privacy Policy ==

**User Data Protection:**
* All data transmission uses secure HTTPS connections
* Data is only sent when actively processing comments
* Users can disable the plugin at any time to stop data transmission
* GeoIP feature is optional and can be disabled
* No tracking cookies or scripts are added to your site
* GDPR compliant

== Support ==

* Support: info@famaserver.com
* Support: support@spambanana.com
* Website: https://spambanana.com

== Credits ==

Developed by FamaServer Team
Website: https://famaserver.com
