Product reviews build essential social proof for your online storefront. However, an annoying automated script glitch often floods your product pages with duplicate comment entries and spammed star ratings. A customer or bot submits a single product review, but it ends up posted 5 or 10 times back-to-back, cluttering the product page layout and skewing your aggregate star-rating metrics.
This issue occurs when the review form submission script lacks proper frontend submission tracking or fails to leverage database constraints. When a user clicks the "Submit Review" button on a slow server, they might click it multiple times out of impatience. If your theme overrides the core WooCommerce template file (single-product-reviews.php) and drops the standard WordPress validation token checks, the backend treats each click as a brand new, unique submission, writing multiple identical rows to the wp_comments table.
The Solution
Resolving duplicate comment spam requires enforcing strict button state changes on the frontend and enabling database-level duplication verification checks.
-
Disable the Review Button Post-Click: Inject this lightweight jQuery optimization script into your theme's global footer layout to instantly lock the submission button the millisecond a user initiates a review post action:
jQuery(document).ready(function($){
$('#commentform').on('submit', function(){
$('#submit').prop('disabled', true).addClass('disabled').val('Submitting Review...');
});
});
-
Enable Strict WordPress Comment Throttling: Go to Settings > Discussion in your dashboard. Ensure that the rule requiring a comment author to have a previously approved comment is enabled, which forces unknown inputs into a safe moderation holding queue.
-
Run a Database Clean-up Script: If your site is already clogged with duplicate reviews, execute a clean SQL deduplication query within phpMyAdmin to safely purge identical comment strings matching the same author ID.
