Init Review System – A Simple Yet Powerful Rating Plugin for WordPress

Version: 1.18 Tiếng Việt

Init Review System – A Simple Yet Powerful Rating Plugin for WordPress
Init Review System is a lightweight, developer-focused plugin that adds a clean and customizable rating system to your WordPress site. It allows users to vote with stars, automatically calculates the average score, and optionally outputs SEO-friendly schema markup.

The key feature of this plugin is that it doesn’t require login, cookies, or complex storage – it uses localStorage to track voting per device. Everything is handled via the native WordPress REST API, ensuring scalability and performance.

Key Features

  • 5-star voting block on the frontend
  • Supports multi-criteria reviews – up to 5 custom aspects
  • Automatic average score calculation and display with schema
  • Insert anywhere using shortcodes – compatible with themes and block builders
  • Optionally auto-insert before/after content or comment form
  • Supports schema.org (AggregateRating) for SEO, both single and multi-criteria
  • Tracks voting using localStorage – no login or cookies required
  • No jQuery – lightweight, responsive, and inherits theme styles

Available Shortcodes

1. Star Rating Block:

[init_review_system]

2. Display Average Score (readonly):

[init_review_score]

3. Multi-Criteria Reviews (vote + display):

[init_review_criteria]

4. Reactions Bar (emoji-based reactions):

[init_reactions]

Supported Attributes:

  • id – Post ID (default: current post)
  • icontrue or false (show star icon – applies to [init_review_score])
  • subtrue or false (display “/5” – applies to [init_review_score])
  • class – Custom CSS class (applies to all shortcodes)
  • hide_if_empty – Hide output if there are no votes
  • schema – Enable/disable JSON-LD schema output (applies to [init_review_system] and [init_review_criteria])
  • per_page – Number of reviews to display in the list (applies to [init_review_criteria])
  • csstrue or false (automatically enqueue CSS for the Reactions Bar – applies to [init_reactions])

Advanced Settings

In the plugin Settings page, you can:

  • Require users to be logged in before voting
  • Enable strict IP check (1 vote per IP within a limited time)
  • Configure auto-insert positions: before/after content or comment form
  • Customize multi-criteria labels (up to 5)
  • Use the built-in shortcode builder to generate shortcode snippets easily

REST API Integration

The plugin uses a native REST endpoint to handle voting:

/wp-json/initrsys/v1/vote

This can be triggered via JavaScript or integrated into external systems.

Developer-Friendly Architecture

Init Review System supports multiple filters and actions to let you extend the vote logic, modify schema output, or display scores wherever needed.

Popular filters include:

  • init_plugin_suite_review_system_get_criteria_labels – customize criteria labels
  • init_plugin_suite_review_system_schema_type – override schema type
  • init_plugin_suite_review_system_schema_data – modify the JSON-LD output

This plugin is minimal by design, but extremely extensible for real-world projects.

Conclusion

If you’re looking for a WordPress review plugin that:

  • Doesn’t bloat your site with unnecessary features
  • Lets you control how reviews are displayed and processed
  • Puts speed, privacy, and flexibility first

Then Init Review System is the right tool for modern WordPress projects.

Review

5.0/5 (1)

Changelog

  • 1.18 – Version-gated DB Table Provisioning
    • Fixed admin_init running database table checks on every admin page load — previously caused redundant queries on each backend visit.
    • Introduced irs_plugin_db_version option flag to gate table checks behind a version comparison — checks only run when the stored DB version is lower than the current plugin version.
    • Added register_activation_hook to handle table creation on fresh install and multisite network activation.
    • Added wpmu_new_blog hook to automatically provision tables when a new subsite is created in a multisite network.
    • Added upgrader_process_complete hook to reset the version flag after a plugin update, triggering a re-check on the next admin page load.
  • 1.17 – Object Cache for Reaction & Review Queries
    • Added 1-hour object cache to init_plugin_suite_review_system_get_score_summary_by_post_id() — avoids recalculating average score and breakdown on every page load.
    • Added 1-hour object cache to init_plugin_suite_review_system_has_user_reviewed() — stores sentinel 1/0 instead of bool to distinguish cache miss from a negative result.
    • Added 1-hour object cache to init_plugin_suite_review_system_get_user_reaction() — stores sentinel __none__ when the user has no reaction to distinguish from a cache miss.
    • Cache for score_summary and has_reviewed is automatically invalidated via the init_plugin_suite_review_system_after_insert action hook when a new review is inserted.
    • Cache for user_reaction is automatically invalidated inside init_plugin_suite_review_system_apply_user_reaction() after each add, switch, or remove operation.
  • 1.16 – Server-rendered Review Items
    • Fixed Load More injecting reviews under the wrong user — avatar and display name now resolved server-side per review.
    • Fixed post-submit review rendering hardcoded HTML incompatible with custom templates.
    • Extracted review-item.php as a standalone overridable template — place in your-theme/init-review-system/review-item.php to customize.
    • REST endpoints (get-criteria-reviews, submit-criteria-review) now server-render each review item and return html field; JS only injects, no longer builds DOM.
    • Added helper init_plugin_suite_review_system_get_criteria_by_post_id() to read configured criteria from plugin options.
    • Added helper init_plugin_suite_review_system_get_review_by_id() to fetch a single review by ID.
    • Removed unused insertNewReview() JS function.
  • 1.15 – per_page cap & opt-in cache TTL
    • Capped $per_page at 100 in the REST get-reviews endpoint to prevent excessive database load.
    • Introduced filter init_plugin_suite_review_system_ttl (default 0) to opt in to object caching.
    • When TTL > 0, review list and total count queries are cached via wp_cache_set under group init_review_system.
    • Cache invalidation is left to the developer via the init_plugin_suite_review_system_after_insert action hook.
  • 1.14 – Reliable Review Ranking with Bayesian Weighted Rating
    • Introduced Bayesian Weighted Rating for accurate and trustworthy review ranking:
      • Eliminates low-sample bias (e.g. single 5★ votes no longer dominate rankings).
      • Prioritizes titles with higher vote confidence.
    • Added new derived meta key _init_review_weighted:
      • Serves as the official ranking score for sorting and queries.
      • Calculated on vote submission, not at query time.
    • Rating architecture improvements:
      • Clear separation between raw review data and ranking data.
      • The plugin now acts as the single source of truth for rating-based ordering.
    • Performance & stability enhancements:
      • Global average rating is cached using transients.
      • Automatic cache invalidation on new votes to prevent stale calculations.
    • Developer experience:
      • The init_plugin_suite_review_system_after_vote hook now includes the weighted score.
      • Configurable minimum vote threshold via init_plugin_suite_review_system_min_votes_threshold filter.
    • No UI or frontend behavior changes.
    • Fully backward compatible with existing REST API consumers.
  • 1.13 – Dark Mode Support for Reactions Bar
    • Added .init-reaction-bar.dark modifier to enable Dark Mode for the Reactions Bar.
    • Improved contrast for emojis, counts, and labels on dark backgrounds.
    • Refined hover, active, and disabled states in Dark Mode.
    • Pure CSS enhancement with no impact on existing logic, layout, or JavaScript.
  • 1.12 – Anti Spam-Click Protection for Star Rating
    • Added front-end protection against rapid multi-click submissions:
      • Introduced new state: isSubmitting to lock interactions while a vote is being sent.
      • Prevents users from firing multiple requests in a split second.
      • Fully preserves existing behavior: single-click, double-click confirmation, and pending .hovering.
    • Improved front-end stability:
      • Guarantees that only one vote request is processed at a time.
      • On API failure: the widget auto-unlocks, allowing users to retry without getting stuck.
    • Fully backward compatible:
      • No changes to REST API, database schema, or server-side vote logic.
      • Does not affect localStorage, highlight system, or .init-review-disabled behavior.
  • 1.11 – User-based Review Fetching + Pagination
    • Added review fetching by user_id:
      • New function: init_plugin_suite_review_system_get_reviews_by_user_id()
      • Supports pagination via $paged and $per_page, identical to post-based queries.
      • Automatically unserializes criteria_scores for direct UI rendering.
    • Data integrity and filtering:
      • Automatically JOINs with wp_posts to exclude orphaned reviews.
      • Only returns reviews linked to existing posts.
    • Added total page counter for user reviews:
      • New function: init_plugin_suite_review_system_get_total_pages_by_user_id()
      • Returns total pagination pages based on $per_page (minimum always 1 for consistent UX).
    • Code quality & security:
      • Sanitized parameters using absint() and max().
      • All SQL queries use $wpdb->prepare() — no raw SQL, no injection risks.
      • Fully PHPCS/WPCS compliant.
  • 1.10 – Manual Score Override + Reset (Admin Metabox)
    • Added a new Manual Score Control Metabox inside the post editor:
      • Allows overriding Average (0–5) and Votes (rating count).
      • Total is auto-calculated = Avg × Votes (rounded to 2 decimals).
      • New stat chip UI (Avg / Votes / Total) — compact and visual, dashboard-style.
    • Display conditions:
      • Metabox only appears when the post already has rating data.
      • No ratings yet → metabox does not get registered (no UI noise).
    • Permissions & security:
      • Only users with edit_others_posts capability (Editor or higher) can see or interact with it.
      • save_post handler validates capability to prevent unauthorized POST submissions.
      • Protected with nonce verification.
    • Code quality & WPCS compliance:
      • No <style> tags — all styling is inline to follow WP Admin standards.
      • All output is escaped using esc_html() / esc_attr().
      • POST input sanitized properly using sanitize_text_field( wp_unslash() ).
      • Fully PHPCS compliant — no more OutputNotEscaped or InputNotSanitized warnings.
  • 1.9 – Double-Click Rating Confirmation
    • Added double-click confirmation to prevent accidental rating.
      • First click → enters pending state, stars are highlighted using class .hovering.
      • Second click → confirms and submits the rating via REST API.
      • No popups, no alerts — pure action-based UX.
    • Settings panel update:
      • New option: Require double-click to rate.
      • Allows admins to enable/disable confirmation mode.
    • JavaScript improvements (non-breaking):
      • Preserves the existing single-click flow when the option is disabled.
      • .hovering persists across mouseleave while pending.
      • Pending state auto-expires after 1.2s to avoid UI lock.
    • No breaking changes:
      • LocalStorage logic remains untouched.
      • No database or REST changes required.
  • 1.8 – Review Pagination & Orphan Filter
    • Updated function init_plugin_suite_review_system_get_reviews_by_post_id():
      • When $post_id = 0, orphaned reviews (linked to deleted or non-existent posts) are now automatically excluded.
      • Applies to all post types (CPTs) ensuring consistent and valid review data.
    • Enhanced shortcode [init_review_criteria]:
      • Added new attribute paged to support review pagination.
      • Internal logic updated to pass dynamic $paged into init_plugin_suite_review_system_get_reviews_by_post_id().
      • Shortcode documentation updated with the new paged parameter description.
    • Minor cleanup:
      • Aligned parameter handling and comments in shortcodes.php.
      • Ensured full backward compatibility with previous Init Plugin Suite versions.
  • 1.7 – Moderation & Enhanced UX
    • Added new review content moderation system:
      • Block banned words and banned phrases (configurable in settings).
      • Detect reviews with no whitespace or excessive word repetition.
      • Return clear REST API error codes (banned_word_detected, banned_phrase_detected, no_whitespace, excessive_repetition).
    • Updated settings page:
      • New checkbox to enable/disable JS Precheck.
      • Two textarea fields for banned words and banned phrases.
    • Improved review modal UX:
      • Enforce rating of all required criteria before submission.
      • Inline error/success messages shown directly below the Submit button.
      • Red highlight on criteria groups that are missing scores.
    • JavaScript updates:
      • Synced basic moderation rules (whitespace + repetition) with backend via wp_localize_script.
      • Mapped REST API error codes to i18n keys for better localization.
    • New CSS:
      • .init-review-inline-msg for inline notifications (light/dark mode).
      • .init-review-criteria-error to visually highlight missing criteria.
    • Added developer filters:
      • init_plugin_suite_review_system_min_len_for_ws_check
      • init_plugin_suite_review_system_repetition_threshold
  • 1.6 – Secure Reactions & Finalized Module
    • The /reactions/toggle endpoint now strictly requires login: enforced is_user_logged_in() and nonce validation.
    • Updated REST API: permission_callback for /reactions/toggle now only allows authenticated users.
    • Shortcode [init_reactions]: require_login is always set to true for consistent frontend behavior.
    • JavaScript refactor:
      • Removed guest/localStorage fallback (no more anonymous reactions).
      • Preserved initial disabled state for buttons; guests always see counts but cannot interact.
      • Fixed bug where guest buttons could be re-enabled after API calls.
    • CSS update: added .is-disabled style — emoji and counts remain clear, while the button UI appears muted.
    • Accessibility improvements: reaction buttons now correctly toggle aria-pressed and reflect the is-active state.
    • Code cleanup: removed obsolete guest logic and simplified state management.
  • 1.5 – Total Reactions & Live Updates
    • Added total reactions counter displayed under “What do you think?”
    • Introduced unique span ID for counter: irs-total-reactions-{post_id} (for JS updates)
    • Updated JavaScript to instantly update total count when users toggle reactions
    • Added CSS styles for .init-reaction-total (spacing, font weight, readability)
    • Improved accessibility with aria-live="polite" for screen reader updates
    • Enhanced i18n with translators comment for the “%s reaction(s)” string
    • Minor code cleanups and consistency improvements
  • 1.4 – Reactions System
    • Introduced Reactions System: emoji-based reactions (👍 😄 😍 😯 😠 😢).
    • Added shortcode [init_reactions] and template reactions-bar.php for displaying the reactions bar.
    • Dual storage: reactions are saved in both post meta (aggregate counts) and a dedicated init_reactions table (user ↔ post mapping).
    • Guest-friendly: works without login, tracked via localStorage.
    • Added developer filters:
      • init_plugin_suite_review_system_get_reaction_types
      • init_plugin_suite_review_system_reaction_meta_key
    • New admin setting: option to auto-insert the Reactions Bar before the comment form (default OFF).
    • Added init_reactions item to the Shortcode Builder with attributes id, class, css.
    • Internal refactor: extracted reaction-core functions, silent table creation with dbDelta().
  • 1.3 – Comprehensive Review Management
    • Restructured admin interface: moved from Settings submenu to a dedicated main menu with a star icon.
    • Added a comprehensive review management system with bulk operations and filtering capabilities.
    • Implemented a review approval workflow with Pending / Approved / Rejected status management.
    • Enhanced the admin dashboard with review statistics, search functionality, and pagination.
    • Added individual review actions: approve, reject, delete with full nonce security.
    • Integrated bulk actions for managing multiple reviews simultaneously.
    • Created a dedicated review management page with detailed review display and user information.
    • Improved database queries with proper prepared statements and PHPCS compliance.
    • Added admin-only review management scripts with proper WordPress enqueueing standards.
    • Refined plugin architecture for better scalability and maintainability.
  • 1.2 – Security hardening
    • Escaped all frontend output using esc_html(), esc_attr(), and wp_kses() to improve security.
    • Secured REST API: enforced login and nonce validation when login mode is enabled.
    • Added uninstall.php to remove all plugin options when uninstalled.
    • Finalized readme.txt for WordPress.org Directory with enhanced metadata and filters section.
    • Added a full == Filters for Developers == section to document available filters and actions.
    • Created a standalone README.md for GitHub with REST API docs, shortcode usage, and developer hooks.
    • Improved admin UI: better labels, descriptions, and grouped settings layout.
    • Refactored shortcode logic for maintainability and extensibility.
  • 1.1 – Multi-criteria review support added
    • Introduced multi-criteria review system – allowing users to rate multiple custom aspects (e.g. UI, UX, Speed, etc.).
    • New shortcode [init_review_criteria] – displays total score, rating modal, review list, and per-criteria breakdown.
    • Criteria are loaded dynamically from admin settings – supports up to 5 custom criteria labels.
    • Logic separated between single and multi-criteria systems to avoid conflicts and keep things clean.
    • New review modal UI optimized for UX: lightweight, intuitive, theme-compatible.
    • Supports dedicated Schema JSON-LD output for multi-criteria reviews (optional via shortcode).
    • Allows limiting number of reviews displayed using the per_page attribute in shortcode.
    • Updated shortcode builder in wp-admin to support the new review system and schema toggles.
    • New developer filters available: init_plugin_suite_review_system_get_criteria_labels, init_plugin_suite_review_system_schema_type, etc.
    • Performance optimization: JS/CSS only loaded when shortcode is present – zero impact on other pages.
    • Minor bug fixes and improved REST data handling and security validations on frontend.
  • 1.0 – First release of Init Review System
    • Introduced shortcode [init_review_system] to display a 5-star voting block on the frontend.
    • Introduced shortcode [init_review_score] to show average rating (readonly), with optional star icon.
    • Added REST API endpoint /wp-json/initrsys/v1/vote to record votes via JavaScript.
    • Voting tracked via localStorage – no login or cookies required.
    • Outputs SEO-optimized JSON-LD schema using AggregateRating.
    • Auto-insert options for rating blocks and score display before/after content or comment form.
    • Option to require login or enable strict IP check to prevent repeated votes.
    • Lightweight, responsive UI that inherits styling from your current theme.
    • Entire frontend rendered using Vanilla JS – no jQuery.
    • Settings page in wp-admin with display options, login restriction toggle, IP protection, and shortcode builder.
    • Built-in filters, actions, and helper functions for developers to extend voting logic, schema, and behavior.
    • Designed to integrate seamlessly with other Init Plugin Suite tools like Init Embed Posts and Init Live Search.
Made with in HCMC.

Comments


  • No comments yet.

Web-Based Tools

Press Ctrl + \ on desktop, or swipe left anywhere on mobile.

Login