90% insert-body-class

Code Review | Insert Body Class Plugin for WordPress

WordPress plugin Insert Body Class Plugin for WordPress scored90%from 54 tests.

About plugin

  • Plugin page: insert-body-class
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 10, 2022
  • Latest release: Dec 11, 2022
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: chitracreation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /479 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.52ms] Passed 4 tests

A check of server-side resources used by Insert Body Class Plugin for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.41 ▲2.02
Dashboard /wp-admin3.34 ▼0.0042.50 ▼18.34
Posts /wp-admin/edit.php3.39 ▲0.0442.38 ▼6.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.05 ▼8.04
Media Library /wp-admin/upload.php3.26 ▲0.0333.34 ▼0.74

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Insert Body Class Plugin for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.71 ▼0.681.62 ▼0.2440.88 ▼3.57
Dashboard /wp-admin2,209 ▲214.88 ▲0.0097.02 ▼6.6135.46 ▼6.66
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0239.62 ▼3.5634.09 ▼0.12
Add New Post /wp-admin/post-new.php6,227 ▲4,69326.13 ▲2.88835.79 ▲145.3261.44 ▲2.18
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0094.85 ▼5.6942.86 ▼4.30

Uninstaller [IO: ▲0.00MB] [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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: add class, body, multiple, calsses, body class plugin...

insert-body-class/insert-body-class.php 92% from 13 tests

The main PHP script in "Insert Body Class Plugin for WordPress" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected49 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP383349

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin