Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Warning in wp-content/plugins/out-of-stock-display-for-woocommerce/out-stock-display-woocommerce-pro.php+49
Use of undefined constant woocommerce - assumed 'woocommerce' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▲3.24MB] [CPU: ▼329.70ms] Passed 4 tests
A check of server-side resources used by Out of stock display for woocommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 7.55 ▲4.43 | 22.30 ▼30.65 |
Dashboard /wp-admin | 7.57 ▲4.16 | 27.39 ▼13.36 |
Posts /wp-admin/edit.php | 7.57 ▲3.93 | 21.99 ▼21.26 |
Add New Post /wp-admin/post-new.php | 7.57 ▲0.60 | 21.02 ▼1,253.54 |
Media Library /wp-admin/upload.php | 7.57 ▲4.27 | 19.95 ▼7.05 |
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius | 7.57 | 22.43 |
Out of stock display /wp-admin/admin.php?page=out_of_stock_display_for_woocommerce_pro | 7.57 | 25.51 |
Server storage [IO: ▲3.35MB] [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: 227 new files
Database: no new tables, 5 new options
New WordPress options |
---|
fs_accounts |
fs_api_cache |
fs_debug_mode |
fs_gdpr |
fs_active_plugins |
Browser metrics Passed 4 tests
Out of stock display for woocommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,960 ▲218 | 16.60 ▲1.41 | 9.05 ▲2.85 | 2.45 ▲0.29 |
Dashboard /wp-admin | 2,948 ▲90 | 6.83 ▲0.68 | 127.13 ▼20.20 | 188.76 ▲22.19 |
Posts /wp-admin/edit.php | 2,753 ▲59 | 3.55 ▲0.32 | 67.12 ▲1.67 | 170.54 ▲24.03 |
Add New Post /wp-admin/post-new.php | 1,664 ▼96 | 20.62 ▼1.55 | 454.67 ▲8.36 | 176.63 ▼8.56 |
Media Library /wp-admin/upload.php | 1,748 ▲57 | 5.79 ▲0.27 | 136.00 ▼24.01 | 223.32 ▲26.30 |
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius | 1,472 | 2.92 | 55.83 | 121.21 |
Out of stock display /wp-admin/admin.php?page=out_of_stock_display_for_woocommerce_pro | 1,283 | 2.87 | 59.49 | 170.39 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin did not uninstall without warnings or errors
- > Warning in wp-content/plugins/out-of-stock-display-for-woocommerce/out-stock-display-woocommerce-pro.php+49
Use of undefined constant woocommerce - assumed 'woocommerce' (this will throw an Error in a future version of PHP)
- Zombie WordPress options detected upon uninstall: 5 options
- fs_active_plugins
- fs_accounts
- fs_api_cache
- fs_gdpr
- fs_debug_mode
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=out_of_stock_display_for_woocommerce_pro
- > Warning in wp-content/plugins/out-of-stock-display-for-woocommerce/out-stock-display-woocommerce-pro.php+49
Use of undefined constant woocommerce - assumed 'woocommerce' (this will throw an Error in a future version of PHP)
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
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/out-of-stock-display-for-woocommerce/admin/partials/out-stock-display-woocommerce-pro-admin-display.php
- > /wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/ajax-loader.php
- > /wp-content/plugins/out-of-stock-display-for-woocommerce/public/partials/out-stock-display-woocommerce-pro-public-display.php
- 11× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/account/partials/addon.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/partials/network-activation.php:6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/out-of-stock-display-for-woocommerce/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/out-of-stock-display-for-woocommerce/public/class-out-stock-display-woocommerce-pro-public.php:110
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/out-of-stock-display-for-woocommerce/admin/class-out-stock-display-woocommerce-pro-admin.php:112
- > PHP Notice
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 issues were found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Plugin Name: Please specify the plugin name on the first line (
=== out-of-stock-display-for-woocommerce ===
) - Donate link: Please fix this invalid URI: ""
out-of-stock-display-for-woocommerce/out-stock-display-woocommerce-pro.php 85% from 13 tests
The main PHP script in "Out of stock display for woocommerce" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("out-of-stock-display-for-woocommerce.php" instead of "out-stock-display-woocommerce-pro.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 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected41,605 lines of code in 174 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 117 | 6,398 | 15,107 | 26,748 |
PO File | 10 | 5,550 | 6,667 | 12,010 |
Sass | 28 | 399 | 77 | 2,515 |
JavaScript | 6 | 39 | 88 | 206 |
CSS | 13 | 23 | 38 | 126 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,360)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 65.37 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,360.00 |
Average method complexity | 4.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 83.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 52 | |
▷ Abstract classes | 2 | 3.85% |
▷ Concrete classes | 50 | 96.15% |
▷ Final classes | 0 | 0.00% |
Methods | 1,069 | |
▷ Static methods | 168 | 15.72% |
▷ Public methods | 750 | 70.16% |
▷ Protected methods | 15 | 1.40% |
▷ Private methods | 304 | 28.44% |
Functions | 111 | |
▷ Named functions | 111 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 117 | |
▷ Global constants | 97 | 82.91% |
▷ Class constants | 20 | 17.09% |
▷ Public constants | 20 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/out-of-stock-display-for-woocommerce.png | 3.15KB | 2.85KB | ▼ 9.48% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |