Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼1.25ms] Passed 4 tests
Server-side resources used by Stock Locations for WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 36.92 ▼3.48 |
Dashboard /wp-admin | 3.31 ▲0.00 | 53.83 ▲1.30 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 50.44 ▲0.81 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 94.95 ▼2.03 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.86 ▼0.28 |
Server storage [IO: ▲6.50MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 114 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Stock Locations for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.22 ▼0.43 | 1.67 ▼0.10 | 40.34 ▼5.35 |
Dashboard /wp-admin | 2,195 ▲18 | 5.60 ▼0.07 | 91.89 ▼2.95 | 39.93 ▼6.03 |
Posts /wp-admin/edit.php | 2,100 ▼3 | 2.15 ▲0.15 | 39.59 ▲0.42 | 35.67 ▲0.28 |
Add New Post /wp-admin/post-new.php | 1,526 ▼3 | 23.08 ▼0.11 | 599.20 ▼4.92 | 51.30 ▼3.05 |
Media Library /wp-admin/upload.php | 1,391 ▼9 | 4.22 ▲0.07 | 100.33 ▲2.69 | 41.02 ▼3.20 |
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
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/stock-locations-for-woocommerce/views/product-pre-select-location-scripts.php
- 9× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function SLW\\SRC\\Helpers\\wc_slw_logger() in wp-content/plugins/stock-locations-for-woocommerce/views/settings-logger.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/stock-locations-for-woocommerce/views/taxonomy-fields-new.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stock-locations-for-woocommerce/inc/addons.php:108
- > PHP Notice
Undefined variable: locations in wp-content/plugins/stock-locations-for-woocommerce/views/product-pre-select-location-scripts.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stock-locations-for-woocommerce/inc/functions-api.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/stock-locations-for-woocommerce/views/taxonomy-fields-edit.php:1
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/stock-locations-for-woocommerce/views/product-pre-select-location-scripts.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/stock-locations-for-woocommerce/views/addons/import-export.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/stock-locations-for-woocommerce/inc/filter-hooks.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
- Screenshots: A description for screenshot #17 is required in stock-locations-for-woocommerce/assets to your readme.txt
stock-locations-for-woocommerce/stock-locations-for-woocommerce.php Passed 13 tests
The entry point to "Stock Locations for WooCommerce" version 2.5.9 is a PHP file that has certain tags in its header comment area
82 characters long description:
This plugin will help you to manage WooCommerce Products stocks through locations.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected18,440 lines of code in 86 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 4 | 0 | 0 | 9,553 |
PHP | 55 | 2,171 | 1,766 | 6,367 |
JavaScript | 13 | 357 | 87 | 1,259 |
CSS | 8 | 67 | 19 | 1,231 |
XML | 4 | 0 | 0 | 16 |
JSON | 2 | 0 | 0 | 14 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
Average class complexity | 32.68 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 142.00 |
Average method complexity | 5.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 45.00 |
Code structure | ||
---|---|---|
Namespaces | 6 | |
Interfaces | 0 | |
Traits | 6 | |
Classes | 25 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 25 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 198 | |
▷ Static methods | 40 | 20.20% |
▷ Public methods | 191 | 96.46% |
▷ Protected methods | 2 | 1.01% |
▷ Private methods | 5 | 2.53% |
Functions | 53 | |
▷ Named functions | 46 | 86.79% |
▷ Anonymous functions | 7 | 13.21% |
Constants | 10 | |
▷ Global constants | 8 | 80.00% |
▷ Class constants | 2 | 20.00% |
▷ Public constants | 2 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 1.36MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icons/map-icon.png | 0.80KB | 0.78KB | ▼ 2.21% |
images/slw-map-popup-thumb.png | 82.59KB | 39.09KB | ▼ 52.67% |
images/star.png | 2.97KB | 1.78KB | ▼ 40.11% |
images/slw-location-popup-thumb.png | 183.32KB | 80.80KB | ▼ 55.93% |
images/slw-archives-thumb.png | 846.78KB | 324.34KB | ▼ 61.70% |