Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.11MB] [CPU: ▼3.37ms] Passed 4 tests
A check of server-side resources used by mcjh button shortcode
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 38.60 ▼8.85 |
Dashboard /wp-admin | 3.42 ▲0.11 | 52.25 ▼1.19 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 47.94 ▼0.96 |
Add New Post /wp-admin/post-new.php | 6.02 ▲0.13 | 95.31 ▼2.48 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 38.64 ▲4.34 |
Server storage [IO: ▲0.27MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by mcjh button shortcode
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,831 ▲96 | 13.22 ▼0.94 | 2.79 ▲1.01 | 45.25 ▼2.12 |
Dashboard /wp-admin | 2,223 ▲32 | 5.88 ▼0.00 | 112.13 ▲7.32 | 42.77 ▼0.33 |
Posts /wp-admin/edit.php | 2,118 ▲26 | 2.08 ▲0.08 | 39.21 ▼11.45 | 36.47 ▲2.37 |
Add New Post /wp-admin/post-new.php | 1,540 ▲7 | 23.02 ▼0.22 | 636.99 ▼2.98 | 63.59 ▲3.80 |
Media Library /wp-admin/upload.php | 1,417 ▲32 | 4.26 ▲0.04 | 104.09 ▼9.11 | 45.50 ▼9.74 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/mcjh-button-shortcode/mcjh-cta-buttons.php
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mcjh-button-shortcode/inc/mcjh-cta-shortcode.php:30
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mcjh-button-shortcode/inc/mcjh-cta-script-loader.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mcjh-button-shortcode/inc/mcjh-cta-admin-page.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/mcjh-button-shortcode/inc/mcjh-cta-backend-ajax.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
- Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
mcjh-button-shortcode/mcjh-cta-buttons.php 85% from 13 tests
The primary PHP file in "mcjh button shortcode" version 1.6.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("mcjh-button-shortcode.php" instead of "mcjh-cta-buttons.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
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 detected5,516 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 6 | 796 | 659 | 3,839 |
PHP | 7 | 110 | 53 | 838 |
CSS | 4 | 6 | 0 | 545 |
HTML | 1 | 1 | 0 | 183 |
PO File | 1 | 46 | 92 | 111 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.17 |
Average class complexity | 8.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 2.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 12 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 3 | 25.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 9 | 75.00% |
Functions | 15 | |
▷ Named functions | 14 | 93.33% |
▷ Anonymous functions | 1 | 6.67% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
src/colorpicker/images/colorpicker_hsb_s.png | 1.14KB | 0.80KB | ▼ 29.97% |
src/colorpicker/images/custom_rgb_b.png | 0.98KB | 0.74KB | ▼ 25.00% |
src/colorpicker/images/custom_hsb_s.png | 1.14KB | 0.89KB | ▼ 21.75% |
src/colorpicker/images/colorpicker_submit.png | 0.96KB | 1.04KB | 0.00% |
src/colorpicker/images/custom_rgb_r.png | 0.99KB | 0.74KB | ▼ 25.34% |