Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼293.20ms] Passed 4 tests
Analyzing server-side resources used by Conditional Payment Methods for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.03 | 70.63 ▲15.87 |
Dashboard /wp-admin | 3.43 ▲0.03 | 37.52 ▼31.31 |
Posts /wp-admin/edit.php | 3.66 ▲0.03 | 47.94 ▲7.13 |
Add New Post /wp-admin/post-new.php | 6.90 ▼0.07 | 105.83 ▼1,145.38 |
Media Library /wp-admin/upload.php | 3.32 ▲0.02 | 24.09 ▼3.23 |
Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: 1 new table, no new options
New tables |
---|
wp_wsmea_conditional_payment_methods |
Browser metrics Passed 4 tests
An overview of browser requirements for Conditional Payment Methods for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,795 ▲41 | 15.97 ▲0.30 | 5.78 ▼0.05 | 2.35 ▼1.40 |
Dashboard /wp-admin | 2,888 ▲30 | 6.13 ▼0.05 | 127.46 ▼10.61 | 157.68 ▼0.51 |
Posts /wp-admin/edit.php | 2,700 ▲13 | 3.24 ▲0.00 | 62.15 ▼6.39 | 140.29 ▼42.84 |
Add New Post /wp-admin/post-new.php | 1,670 ▲15 | 16.41 ▼4.24 | 429.46 ▲28.90 | 186.40 ▲30.38 |
Media Library /wp-admin/upload.php | 1,712 ▲14 | 5.50 ▼0.03 | 138.55 ▼5.42 | 190.54 ▲3.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_wsmea_conditional_payment_methods
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/conditional-payment-methods-for-woocommerce/templates/menu-page-container.php
- 8× PHP files trigger server errors when accessed directly:
- > PHP Warning
extract() expects parameter 1 to be array, null given in wp-content/plugins/conditional-payment-methods-for-woocommerce/templates/conditional-payment-method-settings.php on line 3
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/conditional-payment-methods-for-woocommerce/classes/class-wcpma-conditional-payment-method-list-table.php on line 27
- > PHP Warning
extract() expects parameter 1 to be array, null given in wp-content/plugins/conditional-payment-methods-for-woocommerce/templates/menu-page-container.php on line 3
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/conditional-payment-methods-for-woocommerce/classes/class-wcpma-conditional-payment-method-list-table.php on line 27
- > PHP Fatal error
Uncaught Error: Call to undefined function WC() in wp-content/plugins/conditional-payment-methods-for-woocommerce/templates/conditional-payment-method-settings.php:5
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/conditional-payment-methods-for-woocommerce/classes/class-wcpma-conditional-payment-method-list-table.php on line 27
- > PHP Notice
Undefined variable: tab_content in wp-content/plugins/conditional-payment-methods-for-woocommerce/templates/menu-page-container.php on line 8
- > PHP Notice
Undefined variable: tabs in wp-content/plugins/conditional-payment-methods-for-woocommerce/templates/menu-page-container.php on line 7
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 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
5 plugin tags: conditional payment methods, user country based payment method, woocommerce payment methods by user type, woocommerce, woocommerce checkout
conditional-payment-methods-for-woocommerce/woocommerce-conditional-payment-methods.php 92% from 13 tests
The principal PHP file in "Conditional Payment Methods for WooCommerce" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("conditional-payment-methods-for-woocommerce.php" instead of "woocommerce-conditional-payment-methods.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected825 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 301 | 54 | 775 |
JavaScript | 3 | 12 | 0 | 28 |
CSS | 3 | 5 | 0 | 22 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 14.50 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 43.00 |
Average method complexity | 3.02 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 22.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 41 | |
▷ Static methods | 1 | 2.44% |
▷ Public methods | 40 | 97.56% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 2.44% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 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 images were found in this plugin