Custom Body Class

A plain simple plugin which allows you to add a custom CSS class the HTML body tag.

v0.7.5Andrei LupuUpdated Added 10k+ installs100% rating
35
Score
39
Errors
101
Warnings
+0
Change

Category Scores

Security0
Repo78
Performance100
Maintainability69

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

140 findings

Maintainability

94

12 issue groups

Security

39

7 issue groups

I18n

3

2 issue groups

Supply Chain

2

1 issue group

WARNINGMaintainabilityNon Prefixed Variable FoundGlobal variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attrs".64
Category
Maintainability
Occurrences
64
Severity
warning

Sample message

Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$attrs".

ERRORSecurityOutput Not EscapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$conf'.25
Category
Security
Occurrences
25
Severity
error

Sample message

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

WARNINGMaintainabilityNon Prefixed Class FoundClasses declared by a theme/plugin should start with the theme/plugin prefix. Found: "CustomBodyClassFormFieldImpl".8
Category
Maintainability
Occurrences
8
Severity
warning

Sample message

Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: "CustomBodyClassFormFieldImpl".

WARNINGMaintainabilityNon Prefixed Interface FoundInterfaces declared by a theme/plugin should start with the theme/plugin prefix. Found: "CustomBodyClassForm".7
Category
Maintainability
Occurrences
7
Severity
warning

Sample message

Interfaces declared by a theme/plugin should start with the theme/plugin prefix. Found: "CustomBodyClassForm".

ERRORMaintainabilitymissing direct file access protectionPHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;4
Category
Maintainability
Occurrences
4
Severity
error

Sample message

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

WARNINGMaintainabilityNon Prefixed Constant FoundGlobal constants defined by a theme/plugin should start with the theme/plugin prefix. Found: "EXT".3
Category
Maintainability
Occurrences
3
Severity
warning

Sample message

Global constants defined by a theme/plugin should start with the theme/plugin prefix. Found: "EXT".

ERRORSecurityException Not EscapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$key'.3
Category
Security
Occurrences
3
Severity
error

Sample message

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

WARNINGSecurityInput Not SanitizedDetected usage of a non-sanitized input variable: $_POST['custom_body_class_meta_box_nonce']3
Category
Security
Occurrences
3
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_POST['custom_body_class_meta_box_nonce']

WARNINGSecurityMissing Unslash$_POST['custom_body_class_meta_box_nonce'] not unslashed before sanitization. Use wp_unslash() or similar3
Category
Security
Occurrences
3
Severity
warning

Sample message

$_POST['custom_body_class_meta_box_nonce'] not unslashed before sanitization. Use wp_unslash() or similar

ERRORSecurityQuoted Simple PlaceholderSimple placeholders should not be quoted in the query string in $wpdb->prepare(). Found: '%s'.2
Category
Security
Occurrences
2
Severity
error

Sample message

Simple placeholders should not be quoted in the query string in $wpdb->prepare(). Found: '%s'.

Show 14 more
WARNINGMaintainabilityNon Prefixed Function Found2
Category
Maintainability
Occurrences
2
Severity
warning

Sample message

Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "init_custom_body_class_plugin".

WARNINGSecurityRecommended2
Category
Security
Occurrences
2
Severity
warning

Sample message

Processing form data without nonce verification.

ERRORI18nMissing Arg Domain2
Category
I18n
Occurrences
2
Severity
error

Sample message

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

ERRORSupply Chainhidden files2
Category
Supply Chain
Occurrences
2
Severity
error

Sample message

Hidden files are not permitted.

WARNINGI18nload plugin textdomain Found1
Category
I18n
Occurrences
1
Severity
warning

Sample message

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.

WARNINGMaintainabilityDirect Query1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Use of a direct database call is discouraged.

WARNINGMaintainabilityNo Caching1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

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

WARNINGMaintainabilityNon Prefixed Hookname Found1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

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

WARNINGMaintainabilityprevent path disclosure error reporting1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

error_reporting() can lead to full path disclosure.

WARNINGSecurityInput Not Validated1
Category
Security
Occurrences
1
Severity
warning

Sample message

Detected usage of a possibly undefined superglobal array index: $_SERVER['REQUEST_METHOD']. Check that the array index exists before using it.

WARNINGMaintainabilityNot In Footer1
Category
Maintainability
Occurrences
1
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.

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

Sample message

Tested up to: 6.8 < 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 Complianceplugin header nonexistent domain path1
Category
Repo Compliance
Occurrences
1
Severity
warning

Sample message

The "Domain Path" header in the plugin file must point to an existing folder. Found: "lang"

WARNINGMaintainabilitytrademarked term1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

The plugin slug includes a restricted term. Your plugin slug - "wp-custom-body-class" - contains the restricted term "wp" which cannot be used at all in your plugin slug.

Score History

First score snapshot

v0.7.5

35

Latest

Findings
140
Errors
39
Warnings
101
Check
2.0.0

Related Plugins

Code Embed

10k+ active installs

100
Customize Admin

4k+ active installs

99
Add Admin CSS

10k+ active installs

98
Design Upgrade for LearnDash

7k+ active installs

97
Custom Shortcodes

6k+ active installs

96