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.03MB] [CPU: ▼2.51ms] Passed 4 tests
A check of server-side resources used by NS Product icon badge
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 38.02 ▼1.89 |
Dashboard /wp-admin | 3.33 ▲0.03 | 46.41 ▼3.81 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 43.80 ▼2.95 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 85.55 ▼1.37 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 41.44 ▲6.23 |
/wp-admin/admin.php?page=plugineye274 | 3.23 | 33.49 |
Server storage [IO: ▲1.17MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
NS Product icon badge: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,865 ▲119 | 13.44 ▼0.95 | 2.04 ▲0.02 | 47.82 ▲8.77 |
Dashboard /wp-admin | 2,232 ▲44 | 5.19 ▲0.12 | 105.18 ▼11.44 | 64.27 ▲14.39 |
Posts /wp-admin/edit.php | 2,132 ▲43 | 2.34 ▲0.30 | 36.67 ▼0.13 | 35.65 ▼1.71 |
Add New Post /wp-admin/post-new.php | 1,705 ▲177 | 23.01 ▼0.03 | 792.31 ▲124.87 | 37.51 ▼19.27 |
Media Library /wp-admin/upload.php | 1,417 ▲26 | 4.46 ▲0.25 | 102.72 ▲4.47 | 82.87 ▲35.15 |
/wp-admin/admin.php?page=plugineye274 | 919 | 2.07 | 28.73 | 25.92 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 50% from 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
Please take a closer look at the following
- 9× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/product-icon-badge/ns-iba-icon-badge-archive.php on line 15
- > PHP Warning
include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/product-icon-badge/ns-iba-icon-badge-archive.php on line 15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-icon-badge/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/product-icon-badge/ns-iba-icon-badge-archive.php:33
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-icon-badge/ns_IBA_mainOptions/ns_addNewOptionsPage.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-icon-badge/ns_IBA_mainOptions/ns_changeBadgeStyle.php:172
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/product-icon-badge/ns_IBA_mainOptions/inc.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/product-icon-badge/ns_IBA_mainOptions/ns_addNewBadgeTab.php:18
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-icon-badge/ns-iba-icon-badge-archive.php on line 15
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=plugineye274
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'model')" "TypeError: Cannot read properties of undefined (reading 'model')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/product-icon-badge/ASSETS/JS/ns_IBA_addNewMedia.js?ver=6.3.1:4:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/admin.php?page=plugineye274
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'model')
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
- Screenshots: These screenshots require images: #1 (View image badge in the shop page), #2 (View image badge in the single product page), #3 (View standard badge(triangle) in the shop page), #4 (View standard badge(triangle) in the shop page), #5 (View image badge), #6 (Setting image badge)
product-icon-badge/ns-iba-icon-badge-archive.php 85% from 13 tests
The main PHP file in "NS Product icon badge" ver. 1.2.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("product-icon-badge.php" instead of "ns-iba-icon-badge-archive.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,065 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 263 | 257 | 1,256 |
CSS | 3 | 95 | 161 | 563 |
PO File | 1 | 105 | 159 | 165 |
JavaScript | 4 | 12 | 14 | 81 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 20.00 |
▷ Minimum class complexity | 20.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 2.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 19 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 26.32% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 14 | 73.68% |
Functions | 30 | |
▷ Named functions | 23 | 76.67% |
▷ Anonymous functions | 7 | 23.33% |
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
Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 1.07MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 142.93KB | 85.68KB | ▼ 40.06% |
screenshot-1.png | 173.10KB | 99.43KB | ▼ 42.56% |
screenshot-4.png | 146.10KB | 71.54KB | ▼ 51.04% |
ns_IBA_mainOptions/img/ns_loop_sale.png | 41.69KB | 17.96KB | ▼ 56.93% |
ns_IBA_mainOptions/img/options-position.png | 24.10KB | 4.55KB | ▼ 81.10% |