Restrict Widgets

All in one widgets and sidebars management in WordPress. Allows you to hide or display widgets on specified pages and restrict access for users.

v1.3.1dFactoryUpdated Added 4k+ installs96% rating
38
Score
135
Errors
40
Warnings
+0
Change

Category Scores

Security0
Repo86
Performance100
Maintainability73

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

175 findings

I18n

84

3 issue groups

Security

56

4 issue groups

Maintainability

32

10 issue groups

Repo Compliance

3

3 issue groups

ERRORI18nNon Singular String Literal DomainThe $domain parameter must be a single text string literal. Found: self::ID78
Category
I18n
Occurrences
78
Severity
error

Sample message

The $domain parameter must be a single text string literal. Found: self::ID

ERRORSecurityOutput is not escapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$instance'.46
Category
Security
Occurrences
46
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$instance'.

WARNINGMaintainabilityNon-prefixed hook nameHook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rw_display_widget".11
Category
Maintainability
Occurrences
11
Severity
warning

Sample message

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rw_display_widget".

WARNINGMaintainabilityMissing VersionResource version not set in call to wp_enqueue_script(). This means new versions of the script may not always be loaded due to browser caching.8
Category
Maintainability
Occurrences
8
Severity
warning

Sample message

Resource version not set in call to wp_enqueue_script(). This means new versions of the script may not always be loaded due to browser caching.

WARNINGSecurityInput is not sanitizedDetected usage of a non-sanitized input variable: $_POST['options-available-widgets']4
Category
Security
Occurrences
4
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_POST['options-available-widgets']

WARNINGSecurityRequest data is not unslashed$_POST['options-available-widgets'] not unslashed before sanitization. Use wp_unslash() or similar4
Category
Security
Occurrences
4
Severity
warning

Sample message

$_POST['options-available-widgets'] not unslashed before sanitization. Use wp_unslash() or similar

WARNINGMaintainabilityNot In FooterIn footer ($in_footer) is not set explicitly wp_enqueue_script; It is recommended to load scripts in the footer. Please set this value to `true` to load it in the footer, or explicitly `false` if it should be loaded in the header.4
Category
Maintainability
Occurrences
4
Severity
warning

Sample message

In footer ($in_footer) is not set explicitly wp_enqueue_script; It is recommended to load scripts in the footer. Please set this value to `true` to load it in the footer, or explicitly `false` if it should be loaded in the header.

ERRORI18nMissing Translators CommentA function call to __() 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.4
Category
I18n
Occurrences
4
Severity
error

Sample message

A function call to __() 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.

WARNINGMaintainabilityDirect QueryUse of a direct database call is discouraged.2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

Use of a direct database call is discouraged.

WARNINGMaintainabilityNo CachingDirect database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().

Show 10 more
WARNINGSecurityUnfinished Prepare2
Category
Security
Occurrences
2
Severity
warning

Sample message

Replacement variables found, but no valid placeholders found in the query.

ERRORI18nMissing Arg Domain2
Category
I18n
Occurrences
2
Severity
error

Sample message

Missing $domain parameter in function call to __().

ERRORMaintainabilityForbidden PHP function found1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

The use of function wp_get_sidebars_widgets() is forbidden

ERRORMaintainabilityDeprecated function: screen_icon1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

screen_icon() has been deprecated since WordPress version 3.8.0.

WARNINGMaintainabilityDeprecated parameter: get_site_option parameter 31
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

The parameter "false" at position #3 of get_site_option() has been deprecated since WordPress version 4.4.0. Instead do not pass the parameter.

WARNINGMaintainabilityDeprecated parameter: get_terms parameter 21
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

The parameter "array( 'hide_empty' => false )" at position #2 of get_terms() has been deprecated since WordPress version 4.5.0. Instead do not pass the parameter.

ERRORMaintainabilitybadly named files1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

File and folder names must not contain spaces or special characters.

ERRORRepo Complianceinvalid license1
Category
Repo Compliance
Occurrences
1
Severity
error

Sample message

Your plugin has an invalid license declared. Please update your readme with a valid SPDX license identifier.

ERRORRepo Complianceoutdated tested upto header1
Category
Repo Compliance
Occurrences
1
Severity
error

Sample message

Tested up to: 4.7 < 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.

WARNINGRepo Compliancereadme parser warnings too many tags1
Category
Repo Compliance
Occurrences
1
Severity
warning

Sample message

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

Score History

First score snapshot

v1.3.1

38

Latest

Findings
175
Errors
135
Warnings
40
Check
2.0.0

Related Plugins

Shortcode Widget

10k+ active installs

100
Custom Post Type Widgets

10k+ active installs

99
Featured Image

1k+ active installs

99