Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▼4.15ms] Passed 4 tests
Server-side resources used by Disable payment method / COD fees / Advance COD or Partial payment for Order for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 35.44 ▼7.12 |
Dashboard /wp-admin | 3.32 ▼0.03 | 46.94 ▼12.36 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 47.96 ▲3.99 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 91.61 ▲4.02 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 31.77 ▼1.10 |
Server storage [IO: ▲1.09MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 79 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Disable payment method / COD fees / Advance COD or Partial payment for Order for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,796 ▲49 | 14.32 ▼0.08 | 1.64 ▼0.15 | 38.42 ▼9.48 |
Dashboard /wp-admin | 2,198 ▲17 | 5.53 ▼0.18 | 91.78 ▼22.85 | 41.74 ▲0.09 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.01 ▼0.01 | 40.90 ▲4.17 | 35.95 ▲0.23 |
Add New Post /wp-admin/post-new.php | 1,532 ▲6 | 23.14 ▲0.13 | 591.98 ▼107.99 | 59.57 ▼3.16 |
Media Library /wp-admin/upload.php | 1,409 ▲9 | 4.29 ▲0.09 | 99.01 ▲2.77 | 43.66 ▲1.05 |
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
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test
SRP 0% 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
Please take a closer look at the following
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/disable-payment-method-for-woocommerce/includes/pisol.class.form.php
- 55× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
Use of undefined constant PI_DPMW_SELECTION_RULE_SLUG - assumed 'PI_DPMW_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/city.php on line 133
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/country.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/city.php:8
- > PHP Warning
Use of undefined constant PI_DPMW_SELECTION_RULE_SLUG - assumed 'PI_DPMW_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/zone.php on line 141
- > PHP Fatal error
Uncaught Error: Class 'Class_Pi_Dpmw_Add_Edit' not found in wp-content/plugins/disable-payment-method-for-woocommerce/admin/partials/list-disable-payment-rules.php:3
- > PHP Warning
Use of undefined constant PI_DPMW_SELECTION_RULE_SLUG - assumed 'PI_DPMW_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/product_tag.php on line 186
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/day_of_week.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/shipping_method.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/diff_shipping_add.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-payment-method-for-woocommerce/admin/selection_rules/rules/state.php:8
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
- Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #6 in disable-payment-method-for-woocommerce/assets to your readme.txt
- Donate link: Invalid URI ("piwebsolution.com")
disable-payment-method-for-woocommerce/disable-payment-method-for-woocommerce.php Passed 13 tests
The main PHP script in "Disable payment method / COD fees / Advance COD or Partial payment for Order for WooCommerce" version 1.1.7.11 is automatically included on every request by WordPress
54 characters long description:
Disable any payment method based on various conditions
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 detected19,027 lines of code in 71 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 4 | 2,072 | 28 | 9,490 |
PHP | 58 | 1,676 | 1,126 | 5,593 |
SVG | 3 | 3 | 3 | 3,552 |
JavaScript | 6 | 76 | 52 | 392 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 16.58 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 66.00 |
Average method complexity | 2.76 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 27.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 48 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 48 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 426 | |
▷ Static methods | 54 | 12.68% |
▷ Public methods | 413 | 96.95% |
▷ Protected methods | 8 | 1.88% |
▷ Private methods | 5 | 1.17% |
Functions | 15 | |
▷ Named functions | 12 | 80.00% |
▷ Anonymous functions | 3 | 20.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected