=== MBSM Comment Spam Moderation ===
Contributors: MBSM Group
Tags: comments, spam, moderation, cleaning, ajax, admin, security, bulk actions
Requires at least: 5.0
Tested up to: 6.4
Stable tag: 1.3.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Advanced comment moderation tool by MBSM Group. Manage Spam and Pending comments with a custom dashboard, bulk actions, smart cleaning, and live refresh features.

== Description ==

MBSM Comment Spam Moderation is a powerful, independent plugin designed to help website administrators manage large volumes of comments efficiently. Developed with strict security and SEO standards, this plugin offers a specialized dashboard to handle spam and pending comments with ease.

= Key Features: =

* **Independent Dashboard:** Accessible from the WordPress admin sidebar, separate from standard comments, providing a focused workflow.
* **Smart Clean & Approve:** A unique feature that allows you to bulk process comments by removing author links, replacing the content with a pre-defined safe message, and approving the comment instantly.
* **Live Table Refresh:** See the changes immediately as rows disappear from the table upon processing, without needing to reload the page.
* **AJAX Batching:** Processes comments in batches of 20 (configurable) to prevent server timeouts, allowing you to handle thousands of comments safely.
* **Flexible Filtering:** Filter comments by status (Pending, Spam) and choose how many items to display per page (20, 50, 100, 200).
* **Security First:** Built with WordPress nonces, strict permissions checks, and data sanitization to ensure your site remains safe.
* **Logging System:** A live processing log that shows real-time feedback and reports any errors during bulk operations.
* **Custom Reponses:** Uses a local `comments.json` file to inject safe, professional replies into processed comments.

= Use Cases =

* Cleaning up thousands of spam comments that you want to convert into approved (but safe) interactions.
* Removing backlinks from spam comments while keeping the user's name and avatar.
* Managing comment approval queues quickly without opening individual edit screens.

== Installation ==

This section describes how to install the plugin and get it working.

1. Upload the `mbsm-comment-spam-moderation` folder to the `/wp-content/plugins/` directory.
2. Ensure the `comments.json` file is present inside the plugin folder.
3. Activate the plugin through the 'Plugins' menu in WordPress.
4. Go to **MBSM Moderation** in your admin dashboard sidebar.
5. Select the status (Pending or Spam) and start processing.

== Frequently Asked Questions ==

= Do I need the comments.json file? =
Yes, the "Smart Clean" feature requires `comments.json` to load the replacement comments. You can edit this file to customize the responses.

= Is this plugin safe to use on a production site? =
Yes, absolutely. It is developed by MBSM Group following WordPress coding standards, including security nonces and strict input sanitization.

= Does this delete my original comments? =
In "Smart Clean" mode, it **replaces** the content and **deletes** the author's URL. The comment remains in the database but with new content and a clean URL field. Standard bulk actions (Delete/Spam) will move or remove the comment as expected.

= Can I process thousands of comments at once? =
Yes. The plugin uses AJAX batching to process comments in groups (default 20), preventing server timeouts (504 errors) even with large datasets.

== Screenshots ==

1. The main dashboard showing pending comments.
2. The "Smart Clean" feature in action with the live log.
3. Settings page for plugin configuration.

== Changelog ==

= 1.3.0 =
* Added "Live Table Refresh" - processed rows disappear instantly.
* Added "Items Per Page" filter (20, 50, 100, 200).
* Improved UI responsiveness and log readability.
* Optimized JavaScript for faster execution.

= 1.2.0 =
* Critical Update: Full recode to fix connection errors.
* Improved JSON parsing for better compatibility.
* Enhanced error handling and logging.

= 1.1.0 =
* Added "Smart Clean" functionality.
* Added `comments.json` integration for custom replies.
* Implemented AJAX batch processing.

= 1.0.0 =
* Initial release.
* Basic dashboard for Pending and Spam comments.
* Standard Bulk Actions (Approve, Delete, Spam).

== Upgrade Notice ==

= 1.3.0 =
Please update to enjoy the new live refresh features and better filtering options.
