90% add-custom-body-class

Code Review | Add Custom Body Class

WordPress plugin Add Custom Body Class scored 90% from 54 tests.

About plugin

  • Plugin page: add-custom-body-c...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 13, 2021
  • Latest release: Feb 16, 2023
  • Number of updates: 14
  • Update frequency: every 54.6 days
  • Top authors: anilankola (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 6,519 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.67MB] [CPU: ▼12.88ms] Passed 4 tests

Analyzing server-side resources used by Add Custom Body Class
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.09 ▲2.69
Dashboard /wp-admin3.35 ▲0.0452.18 ▲2.32
Posts /wp-admin/edit.php3.40 ▲0.0452.04 ▼0.91
Add New Post /wp-admin/post-new.php3.13 ▼2.7645.25 ▼55.63
Media Library /wp-admin/upload.php3.27 ▲0.0339.56 ▲3.92

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Add Custom Body Class
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲1413.31 ▲0.072.18 ▼2.6346.44 ▲3.12
Dashboard /wp-admin2,209 ▲35.86 ▼0.0599.87 ▼14.6640.26 ▼3.80
Posts /wp-admin/edit.php2,088 ▼42.03 ▲0.0441.24 ▲0.9334.78 ▼0.71
Add New Post /wp-admin/post-new.php6,460 ▲5,04820.06 ▲2.31860.14 ▲222.0654.51 ▼2.07
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0396.62 ▼6.2943.72 ▼3.42

Uninstaller [IO: ✅] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version format is invalid
You can look at the official readme.txt

add-custom-body-class/add-custom-body-class.php Passed 13 tests

"Add Custom Body Class" version 1.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
59 characters long description:
Use this plugin to add a custom class in the HTML body tag.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin