84% more-body-classes

Code Review | Add More Body Classes

WordPress plugin Add More Body Classes scored84%from 54 tests.

About plugin

  • Plugin page: more-body-classes
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Jul 30, 2015
  • Number of updates: 3
  • Update frequency: every 43.0 days
  • Top authors: ShinichiN (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.99ms] Passed 4 tests

Server-side resources used by Add More Body Classes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.67 ▼4.14
Dashboard /wp-admin3.31 ▲0.0145.25 ▲0.52
Posts /wp-admin/edit.php3.36 ▲0.0051.06 ▲3.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.57 ▼15.86
Media Library /wp-admin/upload.php3.23 ▲0.0034.35 ▼0.49

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Add More Body Classes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.341.75 ▼0.2041.99 ▼0.85
Dashboard /wp-admin2,206 ▲184.89 ▼0.9796.27 ▼16.7138.75 ▼1.09
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0439.23 ▲4.2034.45 ▼4.24
Add New Post /wp-admin/post-new.php1,533 ▼023.43 ▲0.27645.44 ▼14.5848.48 ▼5.78
Media Library /wp-admin/upload.php1,382 ▼94.25 ▲0.0196.46 ▼4.3841.92 ▼1.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/more-body-classes/more-body-classes.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: pages, locale, multilingual, body class

more-body-classes/more-body-classes.php 92% from 13 tests

The principal PHP file in "Add More Body Classes" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1152213

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin