Disable REST API

Disable the use of the REST API on your website to site users. Now with User Role support!

v1.8Dave McHaleUpdated 2023-09-14Added Oct 3, 201490k+ installs96% rating
65
Score
12
Errors
15
Warnings
+0
Change

Category Scores

Security41
Repo91
Performance100
Maintainability92

Top Issues by Category

Issues Details

27 issues found in latest scan

ERROR8
WordPress.Security.EscapeOutput.OutputNotEscaped

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"<label class='switch'><input name='rest_routes[]' value='$route' type='checkbox' id='dra_namespace_$loopCounter' onclick='dra_namespace_click(\"$route\", $loopCounter)' $checkedProp><span class='slider'></span></label><h2><label for='dra_namespace_$loopCounter'> $route_for_display</label></h2><ul>"'.

WARNING3
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound

Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: &quot;DRA_Admin&quot;.

WARNING3
WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

Detected usage of a non-sanitized input variable: $_GET[&#039;role&#039;]

WARNING2
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: &quot;dra_allow_rest_api&quot;.

WARNING2
WordPress.Security.NonceVerification.Recommended

Processing form data without nonce verification.

WARNING2
WordPress.Security.ValidatedSanitizedInput.MissingUnslash

$_GET[&#039;role&#039;] not unslashed before sanitization. Use wp_unslash() or similar

WARNING1
PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound

load_plugin_textdomain() has been discouraged since WordPress version 4.6. When your plugin is hosted on WordPress.org, you no longer need to manually include this function call for translations under your plugin slug. WordPress will automatically load the translations for you as needed.

WARNING1
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: &quot;$dra_requirements_check&quot;.

ERROR1
WordPress.WP.I18n.MissingTranslatorsComment

A function call to esc_html__() with texts containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

ERROR1
WordPress.WP.I18n.NonSingularStringLiteralText

The $text parameter must be a single text string literal. Found: $dra_error_message

ERROR1
missing_direct_file_access_protection

PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;

ERROR1
outdated_tested_upto_header

Tested up to: 6.3 < 7.0. The "Tested up to" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress.

WARNING1
readme_parser_warnings_too_many_tags

One or more tags were ignored. Please limit your plugin to 5 tags.

Latest Snapshot

Findings

27

Errors

12

Warnings

15

Score History

First score snapshot

First scan completed Jun 20, 2026

v1.8 · Plugin Check 2.0.0 · Model 2026.06-mvp-static-v2

Jun 20, 2026

v1.8

65

Latest

Findings
27
Errors
12
Warnings
15
Plugin Check
2.0.0
Model
2026.06-mvp-static-v2

Related Plugins