ReaderFlag – Report This Content Button Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
ReaderFlag puts a “Report this content” button on your posts, pages and public custom post types. A visitor picks a reason, adds an optional message, and sends it. You see every report in a list in wp-admin, change its status, and get an email for each new one (you can turn the emails off).
Features:
- Popup, inline or link-only form. The popup is a native dialog with keyboard support and focus handling.
- Works without JavaScript: the form falls back to a normal page that posts to the server.
- Safe behind page caches (Batcache, edge caches): the form fetches a fresh token by POST when it opens, so no token is ever cached.
- Reasons are editable. Name, email and message fields are each required, optional or hidden.
- Spam protection with no setup: a honeypot, a signed single-use token, a minimum fill time and an optional built-in math question. You can switch to Cloudflare Turnstile, hCaptcha or Google reCAPTCHA (v2 or v3).
- Reports list in wp-admin with filters, sorting, bulk actions (reviewed, resolved, dismissed, delete) and a CSV export.
- A count column and a meta box on the post edit screens.
- Block, shortcode, template function and action hook for placement.
- Button and form styling in the settings, with a live preview. Everything is driven by CSS variables.
- Privacy tools: personal data export and erase, suggested privacy policy text, an optional retention period and optional IP hashing.
- Ready for translation on translate.wordpress.org.
The plugin makes no request to any other site unless you save the keys for a captcha service. See “External services” below.
External services
The plugin works fully on its own. If you choose a captcha service in the settings and save its keys, the visitor’s browser loads that service’s script, and your server sends it the visitor’s response token to check it. Nothing is sent before you save the keys, and the script loads only when a visitor opens the form. Use only the one you choose.
Cloudflare Turnstile
Used when the captcha is set to Turnstile and the site key and secret key are saved.
- What is sent: the visitor’s browser loads
https://challenges.cloudflare.com/turnstile/v0/api.jswhen the form opens. The browser sends the usual request data (IP address, browser details) to Cloudflare. When the report is sent, your server posts the Turnstile response token and the secret key tohttps://challenges.cloudflare.com/turnstile/v0/siteverify. - Terms of service: https://www.cloudflare.com/website-terms/
- Privacy policy: https://www.cloudflare.com/privacypolicy/
hCaptcha
Used when the captcha is set to hCaptcha and the site key and secret key are saved.
- What is sent: the visitor’s browser loads
https://js.hcaptcha.com/1/api.jswhen the form opens and sends the usual request data to hCaptcha. When the report is sent, your server posts the hCaptcha response token and the secret key tohttps://api.hcaptcha.com/siteverify. - Terms of service: https://www.hcaptcha.com/terms
- Privacy policy: https://www.hcaptcha.com/privacy
Google reCAPTCHA (v2 and v3)
Used when the captcha is set to reCAPTCHA v2 or v3 and the site key and secret key are saved.
- What is sent: the visitor’s browser loads
https://www.google.com/recaptcha/api.jswhen the form opens and sends the usual request data to Google. reCAPTCHA also collects information about the visitor’s use of the page. When the report is sent, your server posts the response token and the secret key tohttps://www.google.com/recaptcha/api/siteverify. - Terms of service: https://policies.google.com/terms
- Privacy policy: https://policies.google.com/privacy
Privacy
When a visitor sends a report, the plugin stores the reason, the optional message, the optional name and email address, the reported post, the time, and the user account if the visitor is logged in. It stores a one-way hash of the IP address to limit abuse, unless you set “Visitor IP address” to “Do not store it” in the settings. The IP address itself is not stored.
- Reports are kept until you delete them, or for the number of days you set in “Delete reports after (days)”.
- The plugin adds a personal data exporter and an eraser to the WordPress privacy tools (Tools > Export Personal Data and Erase Personal Data), matched by email address.
- It adds suggested text for your privacy policy page.
- If you use a captcha service, the visitor’s browser talks to that service. See “External services”.
- Removing the plugin keeps your reports unless you turn on “Delete all reports and settings when the plugin is deleted” in the settings first.
Developer hooks
All hooks are prefixed rtcb_.
Filters
rtcb_reasons( array $reasons ): the list of reasons shown in the form. Each item isarray( 'key' => string, 'label' => string ). Items without a non-empty string key and a string label are dropped.rtcb_form_fields( array $fields ): how each optional field behaves. An array with the keysmessage,nameandemail, eachrequired,optionalorhidden.rtcb_validate_report( WP_Error $errors, array $row ): add validation errors before a report is saved.$rowholdspost_id,reason_key,reason_label,message,reporter_name,reporter_email,user_id,ip_hashandstatus. Add an error with the codereason,message,name,emailorcaptchato mark that field, or any other code for a form-level error. Only the error codes are used: the visitor sees the plugin’s own generic message for any code that is not one of those fields, and the message text you pass toWP_Erroris never shown or stored. Return theWP_Error.rtcb_should_display( bool $show, int $post_id, string $context ): return false to hide the button.$contextisauto,shortcode,hookorblock.rtcb_capability( string $capability ): the capability needed to see and handle reports. Defaultmoderate_comments.rtcb_client_ip( string $ip ): the visitor’s IP address, for sites behind a proxy. Starts as a validatedREMOTE_ADDR. Return a valid IP address, or an empty string.rtcb_notification_email( array $args, array $row ): the notification before it is sent.$argshasto(array of addresses),subject,message(plain text) andheaders(array).$rowis the report data. Return an emptytoto send nothing.rtcb_min_fill_seconds( int $seconds ): the shortest time, in seconds, between opening the form and sending it. Default 3.
Actions
rtcb_before_save_report( array $row ): fires after validation passes, just before the report is saved.rtcb_report_saved( int $id, array $row ): fires after the report is saved, before the notification email is sent.rtcb_render_button( array $args ): renders the button in place.$argsmay holdpost_id,mode,textandalign.
Template function
rtcb_the_button( array $args = array() ) echoes the button. It is the same as `do_action( 'rtcb_render_button', $args )`. Arguments: `post_id` (default: the current post), `mode` (`popup`, `inline` or `link`), `text` (button text) and `align` (`left`, `center` or `right`).
Shortcode
[report_this_content] with the attributes `post_id` (default: the current post), `mode` (`popup`, `inline` or `link`) and `text` (button text). Example: `[report_this_content mode="inline" text="Flag this"]`.
Block
The “ReaderFlag Report Button” block has the same options (mode, text, alignment) in the block sidebar.
Source code and build
All PHP, CSS and front-end JavaScript ship unminified. The block editor script blocks/report-button/build/index.js is compiled from the source in blocks/report-button/src/, which ships in the plugin too, with @wordpress/scripts. To rebuild it, run npm install and then npm run build in the plugin folder (the command is in the included package.json).
Screenshots
The report form in a popup, with the built-in math question.
The inline mode: the form opens under the button, inside the post.
The reports list in wp-admin, with status filters, bulk actions and CSV export.
One report, with buttons to change its status or delete it.
Form settings: edit the reasons, set each field to required, optional or hidden, and pick a captcha.
Style settings with a live preview of the button and the form.

