Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼9.55ms] Passed 4 tests
This is a short check of server-side resources used by Custom Body Class
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 37.94 ▼0.90 |
Dashboard /wp-admin | 3.40 ▲0.06 | 42.55 ▼21.80 |
Posts /wp-admin/edit.php | 3.45 ▲0.10 | 43.94 ▼0.70 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 79.48 ▼14.79 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 33.80 ▲0.01 |
Custom Body Class /wp-admin/options-general.php?page=custom_body_class | 3.31 | 32.42 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
custom_body_class_settings |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Custom Body Class
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲47 | 14.44 ▲0.09 | 1.67 ▼0.04 | 39.90 ▼5.32 |
Dashboard /wp-admin | 2,202 ▲22 | 5.56 ▼0.07 | 85.64 ▼3.50 | 38.80 ▼1.87 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.01 ▲0.05 | 39.86 ▲1.81 | 36.85 ▼1.28 |
Add New Post /wp-admin/post-new.php | 6,241 ▲4,715 | 18.86 ▼4.12 | 916.80 ▲215.39 | 64.72 ▲7.52 |
Media Library /wp-admin/upload.php | 1,407 ▲4 | 4.21 ▼0.01 | 106.88 ▼1.27 | 44.98 ▼0.04 |
Custom Body Class /wp-admin/options-general.php?page=custom_body_class | 976 | 2.00 | 22.18 | 27.99 |
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
You still need to fix the following
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- custom_body_class_settings
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-custom-body-class/core/defaults.php:26
- > PHP Fatal error
Uncaught Error: Class 'custom_body_class' not found in wp-content/plugins/wp-custom-body-class/views/admin.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-custom-body-class/settings/general.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: class, custom, body, css
wp-custom-body-class/custom_body_class.php 85% from 13 tests
The main PHP script in "Custom Body Class" version 0.7.3 is automatically included on every request by WordPress
You should first fix the following items:
- Domain Path: The domain path points to a folder that does not exist ("/lang")
- Main file name: Name the main plugin file the same as the plugin slug ("wp-custom-body-class.php" instead of "custom_body_class.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,899 lines of code in 52 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 46 | 490 | 1,055 | 1,447 |
JavaScript | 2 | 41 | 53 | 299 |
CSS | 1 | 18 | 8 | 92 |
JSON | 1 | 0 | 0 | 31 |
Markdown | 1 | 7 | 0 | 26 |
SVG | 1 | 0 | 0 | 4 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 8.88 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 45.00 |
Average method complexity | 2.34 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 7 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 130 | |
▷ Static methods | 26 | 20.00% |
▷ Public methods | 113 | 86.92% |
▷ Protected methods | 17 | 13.08% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/delete.png | 0.24KB | 0.22KB | ▼ 9.20% |