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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.09MB] [CPU: ▲0.03ms] Passed 4 tests
An overview of server-side resources used by JP Theme Switcher Bar
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 48.68 ▲10.34 |
Dashboard /wp-admin | 3.39 ▲0.09 | 50.69 ▲3.32 |
Posts /wp-admin/edit.php | 3.44 ▲0.09 | 51.22 ▼0.13 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.11 | 92.25 ▼7.48 |
Media Library /wp-admin/upload.php | 3.31 ▲0.09 | 40.11 ▲4.42 |
JP Theme Bar /wp-admin/themes.php?page=jptb_settings | 3.28 | 37.38 |
Server storage [IO: ▲1.25MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 11 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
bg_colour |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
label |
text_colour |
widget_recent-posts |
label_bg_colour |
... |
Browser metrics Passed 4 tests
A check of browser resources used by JP Theme Switcher Bar
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,031 ▲285 | 14.00 ▼0.37 | 12.18 ▲10.22 | 42.97 ▲2.82 |
Dashboard /wp-admin | 2,212 ▲24 | 4.88 ▼0.02 | 111.36 ▲1.43 | 42.54 ▲1.17 |
Posts /wp-admin/edit.php | 2,095 ▲6 | 2.04 ▲0.08 | 41.21 ▲1.73 | 35.21 ▼4.51 |
Add New Post /wp-admin/post-new.php | 1,533 ▲19 | 23.44 ▲5.91 | 670.57 ▲44.06 | 57.68 ▲0.53 |
Media Library /wp-admin/upload.php | 1,397 ▲6 | 4.22 ▲0.03 | 94.59 ▼12.29 | 42.64 ▼0.27 |
JP Theme Bar /wp-admin/themes.php?page=jptb_settings | 897 | 2.27 | 27.04 | 32.03 |
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
- Zombie WordPress options were found after uninstall: 11 options
- theysaidso_admin_options
- widget_recent-comments
- label_bg_colour
- widget_recent-posts
- label_text_colour
- text_colour
- can_compress_scripts
- db_upgraded
- bg_colour
- label
- ...
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 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
Please fix the following
- 3× 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/jp-theme-bar/jptb-admin.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jp-theme-bar/jptb-frontend.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jp-theme-bar/jptb-frontend.php:9
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Tags: Please delete some tags, you are using 11 tag instead of maximum 10
jp-theme-bar/jptb-theme-bar.php 85% from 13 tests
The principal PHP file in "JP Theme Switcher Bar" v. 0.1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("jp-theme-bar.php" instead of "jptb-theme-bar.php")
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
No dangerous file extensions were detected424 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 64 | 237 | 367 |
CSS | 1 | 5 | 0 | 32 |
JavaScript | 2 | 2 | 0 | 25 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.13 |
Average class complexity | 10.00 |
▷ Minimum class complexity | 9.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 1.69 |
▷ 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 | 26 | |
▷ Static methods | 1 | 3.85% |
▷ Public methods | 26 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.51MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 103.44KB | 31.54KB | ▼ 69.51% |
assets/banner-772x250.png | 8.11KB | 7.93KB | ▼ 2.17% |
assets/banner-1544x500.png | 16.73KB | 16.24KB | ▼ 2.93% |
assets/screenshot-2.png | 394.07KB | 139.10KB | ▼ 64.70% |