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.11MB] [CPU: ▼2.71ms] Passed 4 tests
Analyzing server-side resources used by Restrict Payment Methods For WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 44.84 ▲1.35 |
Dashboard /wp-admin | 3.41 ▲0.11 | 51.79 ▲1.99 |
Posts /wp-admin/edit.php | 3.52 ▲0.17 | 48.69 ▼3.42 |
Add New Post /wp-admin/post-new.php | 6.01 ▲0.13 | 98.50 ▼10.75 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 38.86 ▲3.31 |
Add New /wp-admin/post-new.php?post_type=payment_gateway | 3.34 | 46.23 |
Payment Gateway Rules /wp-admin/edit.php?post_type=payment_gateway | 3.38 | 47.94 |
Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
recovery_mode_email_last_sent |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
Restrict Payment Methods For WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,874 ▲128 | 13.55 ▼1.10 | 2.09 ▲0.36 | 44.80 ▲4.79 |
Dashboard /wp-admin | 2,270 ▲69 | 5.38 ▲0.48 | 103.64 ▼10.36 | 39.18 ▼10.07 |
Posts /wp-admin/edit.php | 2,154 ▲57 | 2.48 ▲0.44 | 43.81 ▲8.12 | 35.01 ▼1.69 |
Add New Post /wp-admin/post-new.php | 1,569 ▲15 | 23.29 ▲0.56 | 624.46 ▼49.10 | 37.89 ▼18.90 |
Media Library /wp-admin/upload.php | 1,452 ▲49 | 4.70 ▲0.47 | 102.61 ▼37.05 | 43.15 ▼7.37 |
Add New /wp-admin/post-new.php?post_type=payment_gateway | 1,282 | 1.71 | 11.63 | 40.66 |
Payment Gateway Rules /wp-admin/edit.php?post_type=payment_gateway | 1,121 | 2.39 | 36.87 | 29.61 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie WordPress options were found after uninstall: 7 options
- can_compress_scripts
- widget_recent-comments
- recovery_mode_email_last_sent
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
- > GET request to /wp-admin/post-new.php?post_type=payment_gateway
- > Error in wp-content/plugins/restrict-payment-methods-for-woocommerce/includes/GMWRPM_Admin.php+238
Uncaught Error: Class 'WC_Shipping_Zone' not found in wp-content/plugins/restrict-payment-methods-for-woocommerce/includes/GMWRPM_Admin.php:238
Stack trace:
#0 wp-content/plugins/restrict-payment-methods-for-woocommerce/includes/GMWRPM_Admin.php(173): GMWRPM_Admin->GMWRPM_shipping()
#1 wp-content/plugins/restrict-payment-methods-for-woocommerce/includes/GMWRPM_Admin.php(91): GMWRPM_Admin->GMWRPM_comman_html()
#2 wp-admin/includes/template.php(1443): GMWRPM_Admin->GMWRPM_metabox_rule()
#3 wp-admin/edit-form-advanced.php(688): do_meta_boxes()
#4 wp-admin/post-new.php(75): require('/var/www/wordpr...')
#5 {main}
thrown
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
Almost there! Just fix the following items
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/restrict-payment-methods-for-woocommerce/includes/GMWRPM_Radio_Button.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
- Contributors: Plugin contributors not specified
- Screenshots: A description for screenshot #1 is required in restrict-payment-methods-for-woocommerce/assets to your readme.txt
restrict-payment-methods-for-woocommerce/gm-woocommerce-restrict-payment-methods.php 85% from 13 tests
The entry point to "Restrict Payment Methods For WooCommerce" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("restrict-payment-methods-for-woocommerce.php" instead of "gm-woocommerce-restrict-payment-methods.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected593 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 119 | 71 | 498 |
JavaScript | 3 | 18 | 2 | 91 |
CSS | 2 | 0 | 0 | 4 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.65 |
Average class complexity | 21.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 41.00 |
Average method complexity | 4.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 35.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 23 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 23 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/js/select2/select2.png | 0.51KB | 0.99KB | 0.00% |
assets/img/close_btn.png | 36.22KB | 17.59KB | ▼ 51.42% |