Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲1.33MB] [CPU: ▲2.39ms] 75% from 4 tests
Analyzing server-side resources used by Locked Payment Methods for WooCommerce
The following require your attention
- CPU: The total CPU usage must kept under 500.00ms (currently 1,848.67ms on /wp-admin/admin.php?page=locked-payment-methods-for-woocommerce)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.79 ▲1.33 | 57.23 ▲8.97 |
Dashboard /wp-admin | 4.64 ▲1.34 | 51.40 ▲1.52 |
Posts /wp-admin/edit.php | 4.69 ▲1.34 | 52.49 ▲5.28 |
Add New Post /wp-admin/post-new.php | 7.31 ▲1.43 | 87.29 ▼4.82 |
Media Library /wp-admin/upload.php | 4.56 ▲1.33 | 42.77 ▲7.59 |
Locked Payment Methods for WooCommerce /wp-admin/admin.php?page=locked-payment-methods-for-woocommerce | 4.92 | 1,848.67 |
Freemius Debug [v.2.4.4] /wp-admin/admin.php?page=freemius | 4.88 | 39.09 |
Server storage [IO: ▲4.57MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 697 new files
Database: no new tables, 11 new options
New WordPress options |
---|
fs_gdpr |
can_compress_scripts |
fs_active_plugins |
theysaidso_admin_options |
fs_accounts |
widget_recent-posts |
widget_theysaidso_widget |
fs_debug_mode |
db_upgraded |
widget_recent-comments |
... |
Browser metrics Passed 4 tests
Locked Payment Methods for WooCommerce: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,834 ▲88 | 13.59 ▼0.71 | 1.61 ▼0.44 | 28.07 ▼14.88 |
Dashboard /wp-admin | 2,229 ▲50 | 5.81 ▼0.09 | 101.29 ▼5.67 | 42.36 ▼2.06 |
Posts /wp-admin/edit.php | 2,121 ▲32 | 2.01 ▲0.02 | 40.60 ▲0.37 | 39.24 ▲4.07 |
Add New Post /wp-admin/post-new.php | 1,534 ▲1 | 23.32 ▼0.03 | 666.30 ▲31.15 | 58.99 ▼2.89 |
Media Library /wp-admin/upload.php | 1,417 ▲29 | 4.17 ▼0.02 | 107.20 ▲4.69 | 50.15 ▲7.95 |
Locked Payment Methods for WooCommerce /wp-admin/admin.php?page=locked-payment-methods-for-woocommerce | 965 | 1.74 | 29.00 | 53.04 |
Freemius Debug [v.2.4.4] /wp-admin/admin.php?page=freemius | 1,053 | 1.71 | 25.50 | 27.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/locked-payment-methods-for-woocommerce/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8575
Undefined property: stdClass::$plugins
- The uninstall procedure has failed, leaving 11 options in the database
- fs_active_plugins
- can_compress_scripts
- fs_debug_mode
- fs_gdpr
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- fs_accounts
- locked_payment_methods_for_woocommerce_original_version
- ...
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
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 58× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'DWS_LPMWC_Deps\\Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Exception/InvalidDefinition.php:13
- > PHP Fatal error
Uncaught Error: Interface 'DWS_LPMWC_Deps\\DI\\Definition\\Definition' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/ObjectDefinition/MethodInjection.php:12
- > PHP Fatal error
Uncaught Error: Class 'DWS_LPMWC_Deps\\Psr\\Log\\AbstractLogger' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/psr/log/Psr/Log/NullLogger.php:13
- > PHP Fatal error
Uncaught Error: Class 'DWS_LPMWC_Deps\\DI\\Definition\\Helper\\CreateDefinitionHelper' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Helper/AutowireDefinitionHelper.php:12
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Compiler/Template.php:4
- > PHP Fatal error
Uncaught Error: Interface 'DWS_LPMWC_Deps\\Invoker\\InvokerInterface' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/invoker/src/Invoker.php:19
- > PHP Fatal error
Uncaught Error: Class 'DWS_LPMWC_Deps\\DI\\Definition\\FactoryDefinition' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/DecoratorDefinition.php:12
- > PHP Fatal error
Uncaught Error: Interface 'DWS_LPMWC_Deps\\DI\\Factory\\RequestedEntry' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Definition.php:14
- > PHP Fatal error
Uncaught Error: Interface 'DWS_LPMWC_Deps\\Psr\\Container\\ContainerInterface' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Container.php:37
- > PHP Fatal error
Uncaught Error: Interface 'DWS_LPMWC_Deps\\DI\\Factory\\RequestedEntry' not found in wp-content/plugins/locked-payment-methods-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Compiler/RequestedEntryHolder.php:10
- > 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 Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: woocommerce, manual permission, payment methods
locked-payment-methods-for-woocommerce/locked-payment-methods-for-woocommerce.php Passed 13 tests
The principal PHP file in "Locked Payment Methods for WooCommerce" v. 1.3.5 is loaded by WordPress automatically on each request
136 characters long description:
A WooCommerce extension which allows shop managers to hide payment methods from customers that haven't been manually granted access yet.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin47,110 lines of code in 548 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 529 | 8,658 | 33,572 | 46,421 |
PO File | 2 | 158 | 238 | 386 |
JavaScript | 3 | 34 | 59 | 194 |
JSON | 1 | 0 | 0 | 48 |
SVG | 1 | 1 | 0 | 30 |
Markdown | 1 | 4 | 0 | 17 |
CSS | 11 | 0 | 0 | 14 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 15.44 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,911.00 |
Average method complexity | 3.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 100 | |
Interfaces | 81 | |
Traits | 98 | |
Classes | 250 | |
▷ Abstract classes | 38 | 15.20% |
▷ Concrete classes | 212 | 84.80% |
▷ Final classes | 20 | 9.43% |
Methods | 2,578 | |
▷ Static methods | 326 | 12.65% |
▷ Public methods | 2,022 | 78.43% |
▷ Protected methods | 174 | 6.75% |
▷ Private methods | 382 | 14.82% |
Functions | 233 | |
▷ Named functions | 173 | 74.25% |
▷ Anonymous functions | 60 | 25.75% |
Constants | 220 | |
▷ Global constants | 159 | 72.27% |
▷ Class constants | 61 | 27.73% |
▷ Public constants | 59 | 96.72% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
vendor/freemius/wordpress-sdk/assets/img/locked-payment-methods-for-woocommerce.png | 9.54KB | 3.07KB | ▼ 67.85% |