Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.01MB] [CPU: ▼145.16ms] Passed 4 tests
An overview of server-side resources used by WC Restrict Payment Methods
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.85 ▲0.13 | 34.26 ▲12.69 |
Dashboard /wp-admin | 3.08 ▲0.02 | 53.27 ▲2.13 |
Posts /wp-admin/edit.php | 3.13 ▲0.02 | 45.76 ▼2.34 |
Add New Post /wp-admin/post-new.php | 5.43 ▲0.00 | 89.64 ▼573.83 |
Media Library /wp-admin/upload.php | 3.02 ▲0.02 | 30.47 ▼6.60 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for WC Restrict Payment Methods
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,689 ▲93 | 15.99 ▲0.30 | 11.55 ▼1.45 | 50.71 ▲4.96 |
Dashboard /wp-admin | 2,980 ▲49 | 5.88 ▼0.27 | 154.45 ▲0.62 | 119.70 ▲10.17 |
Posts /wp-admin/edit.php | 2,749 ▲10 | 2.71 ▼0.01 | 79.94 ▲9.88 | 90.66 ▲2.77 |
Add New Post /wp-admin/post-new.php | 1,507 ▲7 | 18.45 ▼0.15 | 382.79 ▼61.22 | 112.74 ▲0.54 |
Media Library /wp-admin/upload.php | 1,817 ▲7 | 5.03 ▲0.03 | 181.59 ▲33.60 | 119.11 ▲12.47 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested
SRP Passed 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
No output text or server-side errors detected on direct access of PHP files
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, restrict, methods, gateway, payment
wc-restrict-payment-methods/wc-restrict-payment-methods.php Passed 13 tests
"WC Restrict Payment Methods" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
110 characters long description:
Restrict Woocommerce payment methods by products. If the product is in the cart, the method will not be shown.
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
Everything looks great! No dangerous files found in this plugin132 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 28 | 11 | 132 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.50 |
Average class complexity | 19.00 |
▷ Minimum class complexity | 19.00 |
▷ Maximum class complexity | 19.00 |
Average method complexity | 2.38 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 13 | |
▷ Static methods | 1 | 7.69% |
▷ Public methods | 12 | 92.31% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 7.69% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin