RatePress
RatePress Docs

Getting Started

  • Introduction
  • Getting Started

Core Features

  • Rating System
  • Templates
  • Blocks & Shortcodes

Advanced Features

  • Notifications
  • Confetti Effects

Languages

  • Translation System

Developer Guide

  • Architecture
  • API Reference
GitHubLive Demos

RatePress

The modern rating plugin for WordPress. Built with clean architecture, designed for performance, and loved by developers.

Documentation

  • Get Started
  • Technical Architecture
  • Templates
  • Translations

Resources

  • Download
  • Support
  • Contact
  • Review Us

© 2025 RatePress. All rights reserved.

Made with passion by Code Idealists

Rating SystemCategory-Based

RatePress Rating System

A comprehensive, category-based rating system supporting binary, bipolar, and scale ratings with clean APIs and headless JavaScript integration.

Get StartedBrowse TemplatesView Source

Rating Categories

RatePress supports three distinct rating categories, each optimized for different use cases

Binary Ratings
Heart/Like

Simple yes/no feedback with heart or like icons

Bipolar Ratings
Like/Dislike

Up/down voting with neutral option for balanced feedback

Scale Ratings
Stars/Percentage

Star ratings, dot scales, or numerical sliders for detailed feedback

Database Architecture

Clean, category-based database design supporting all rating types

Ratings Table Schema
ColumnTypeDescription
idBIGINT UNSIGNEDPrimary key
object_idBIGINT UNSIGNEDPost or comment ID
object_typeENUM('post', 'comment')Type of content being rated
user_idBIGINT UNSIGNEDUser ID (0 for anonymous)
ipVARCHAR(45)IP address for rate limiting
cookie_hashVARCHAR(64)Anonymous user identifier
categoryENUM('binary', 'bipolar', 'scale')Rating category
valueFLOATRating value (normalized 0-1 for scale)
created_atTIMESTAMPRating timestamp

SQL Schema

REST API

Clean, category-based REST endpoints for all rating operations

POST /ratepress/v1/rate

Submit a rating for any object with category and value validation.

Parameters
ParameterTypeRequiredDescription
object_idintegerYesPost or comment ID
object_typestringNo'post' or 'comment' (default: 'post')
categorystringYes'binary', 'bipolar', or 'scale'
valuenumberYesRating value (validated per category)
Example Request

Frontend JavaScript API

Headless JavaScript system using data attributes for complete template flexibility

Core Methods
RatePress.rate()
RatePress.getStats()
Data Attributes
Widget Container
Rating Buttons
Automatic UI Updates

The JavaScript system automatically updates all elements using data attributes when ratings change.

Active States

Buttons show user's rating

Live Counts

Statistics update instantly

Template Agnostic

Works with any design

Technical Implementation

How the category-based system works under the hood

Value Normalization
Binary Ratings

Values: 0 (no), 1 (yes)

Bipolar Ratings

Values: -1 (down), 0 (neutral), 1 (up)

Scale Ratings

Values: 0.0 to 1.0 (normalized)

Anti-Spam & Security
IP-based rate limiting
Cookie-based anonymous tracking
User authentication checks
Category-specific validation
Admin unlimited rating override
All ratings are validated server-side with comprehensive security checks.

Code Examples

Complete examples for implementing rating systems

Rating Service Usage

Ready to Implement Ratings?

The RatePress rating system provides everything you need for professional user feedback collection.

Start BuildingBrowse TemplatesView Source Code