Bulk Reviews Generator for WooCommerce

Effortlessly boost your store’s credibility with real-looking customer reviews! This powerful WooCommerce plugin automatically adds 20-50 random reviews to your products, ensuring a 90% positive and 10% negative ratio for an authentic customer experience.

Key Features:
✔️ Adds unique customer-style reviews to all WooCommerce products
✔️ Prevents duplicate reviews to optimize performance
✔️ Uses random usernames for natural-looking feedback
✔️ One-click setup – Just activate & generate reviews

📌 Perfect for eCommerce stores, digital products, clothing, electronics, and more!
🎯 Increase sales & build trust with realistic reviews!

👨‍💻 Author: Ukasha Khalil
Support My Work: Buy Me a Coffee

Download Plugin

<?php
/**
 * Plugin Name: Bulk Gaming Reviews Generator
 * Description: Adds 20-50 random reviews to all WooCommerce products with 90% positive and 10% negative reviews.
 * Version: 1.0
 * Author: Ukasha Khalil
 * Give Me Tip: https://buymeacoffee.com/ukasha
 */

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}

// Add Admin Menu
function bgrg_add_admin_menu() {
    add_menu_page('Bulk Reviews', 'Bulk Reviews', 'manage_options', 'bulk-reviews', 'bgrg_admin_page', 'dashicons-admin-comments', 25);
}
add_action('admin_menu', 'bgrg_add_admin_menu');

// Admin Page Content
function bgrg_admin_page() {
    if (isset($_POST['bgrg_generate_reviews'])) {
        bgrg_generate_reviews();
        echo '<div class="updated"><p>Reviews have been added successfully!</p></div>';
    }
    echo '<div class="wrap">
            <h1>Bulk Gaming Reviews Generator</h1>
            <form method="post">
                <input type="hidden" name="bgrg_generate_reviews" value="1">
                <button type="submit" class="button button-primary">Generate Reviews</button>
            </form>
          </div>';
}

// Function to Generate Reviews
function bgrg_generate_reviews() {
    $products = wc_get_products(['limit' => 200, 'status' => 'publish']);
    if (empty($products)) return;

    $positive_reviews = [
        "Amazing product! My gaming experience has improved a lot.",
        "Perfect for hardcore gamers. Highly recommended!",
        "The build quality is top-notch. Feels premium!",
        "Great response time, no lag at all!",
        "Totally worth the price. Must-buy for any gamer!",
        "Looks amazing with my RGB setup!",
        "Super comfortable for long gaming sessions!",
        "I use this daily for my gaming streams, absolutely love it!",
        "Gaming at night feels better with this product!",
        "One of the best purchases for my gaming setup!"
    ];

    $negative_reviews = [
        "Good quality, but the delivery took a bit longer.",
        "Decent product, but expected better performance.",
        "Not the best quality, but works fine for casual gaming.",
        "Could be better, but overall a solid product for the price.",
        "A bit overpriced but delivers good performance.",
        "Not what I expected, but still a decent purchase.",
        "A bit heavy, but overall a great product for serious gamers.",
        "Delivery was late, and packaging was slightly damaged.",
        "Could use some improvements, but not bad overall.",
        "Small issue with delivery, but the product itself is top-notch."
    ];

    $gamer_names = [
        "ShadowGamer99", "ProSniperX", "NoScopeLegend", "EliteGamer007",
        "RogueAssassin", "PixelWarrior", "CyberNinja", "NeonRacer",
        "VenomStriker", "EpicQuestMaster"
    ];

    foreach ($products as $product) {
        $existing_reviews = get_comments(['post_id' => $product->get_id(), 'count' => true]);
        if ($existing_reviews > 0) {
            continue; // Skip if reviews already exist
        }

        $num_reviews = rand(20, 50);
        $num_positive = round($num_reviews * 0.9);
        $num_negative = $num_reviews - $num_positive;

        for ($i = 0; $i < $num_positive; $i++) {
            $random_name = $gamer_names[array_rand($gamer_names)];
            $random_text = $positive_reviews[array_rand($positive_reviews)];
            $comment_id = wp_insert_comment([
                'comment_post_ID' => $product->get_id(),
                'comment_author' => $random_name,
                'comment_content' => $random_text,
                'comment_type' => 'review',
                'comment_approved' => 1,
            ]);
            update_comment_meta($comment_id, 'rating', 5);
        }

        for ($i = 0; $i < $num_negative; $i++) {
            $random_name = $gamer_names[array_rand($gamer_names)];
            $random_text = $negative_reviews[array_rand($negative_reviews)];
            $comment_id = wp_insert_comment([
                'comment_post_ID' => $product->get_id(),
                'comment_author' => $random_name,
                'comment_content' => $random_text,
                'comment_type' => 'review',
                'comment_approved' => 1,
            ]);
            update_comment_meta($comment_id, 'rating', rand(1, 3));
        }
    }
}

Leave a Comment