Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
- Install procedure validation failed for this plugin
- > Warning in wp-content/plugins/woocommerce-payplug/woocommerce-payplug.php+41
array_keys() expects parameter 1 to be array, bool given
Server metrics [RAM: ▼1.86MB] [CPU: ▼189.90ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce PayPlug
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.77 ▼1.06 | 5.86 ▼28.19 |
Dashboard /wp-admin | 1.79 ▼1.26 | 6.03 ▼43.34 |
Posts /wp-admin/edit.php | 1.79 ▼1.31 | 5.48 ▼40.68 |
Add New Post /wp-admin/post-new.php | 1.79 ▼3.64 | 5.46 ▼645.12 |
Media Library /wp-admin/upload.php | 1.79 ▼1.22 | 6.93 ▼30.47 |
Server storage [IO: ▲4.63MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 283 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
WooCommerce PayPlug: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,703 ▲107 | 16.26 ▲0.71 | 8.51 ▲0.35 | 51.38 ▲5.29 |
Dashboard /wp-admin | 2,973 ▲42 | 5.90 ▼0.02 | 132.66 ▼10.73 | 115.08 ▼6.57 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.69 ▼0.00 | 65.70 ▼2.07 | 88.49 ▲0.75 |
Add New Post /wp-admin/post-new.php | 1,683 ▲183 | 18.72 ▲0.19 | 367.22 ▼7.45 | 108.74 ▼2.28 |
Media Library /wp-admin/upload.php | 1,804 ▼0 | 5.01 ▼0.03 | 139.16 ▼16.43 | 123.34 ▲0.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin cannot be uninstalled
- > Warning in wp-content/plugins/woocommerce-payplug/woocommerce-payplug.php+41
array_keys() expects parameter 1 to be array, bool given
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
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
Almost there! Just fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/woocommerce-payplug/inc/freemius/templates/ajax-loader.php
- 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Resource\\APIResource' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Resource/PaymentHostedPayment.php:7
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Exception\\PayplugException' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Exception/HttpException.php:7
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Resource\\APIResource' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Resource/PaymentBilling.php:7
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Exception\\HttpException' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Exception/UnauthorizedException.php:7
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/woocommerce-payplug/inc/freemius/templates/account/partials/addon.php:9
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Resource\\APIResource' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Resource/Refund.php:8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/woocommerce-payplug/inc/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Resource\\APIResource' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Resource/Payment.php:8
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Exception\\PayplugException' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Exception/DependencyException.php:7
- > PHP Fatal error
Uncaught Error: Class 'Payplug\\Exception\\HttpException' not found in wp-content/plugins/woocommerce-payplug/inc/lib/Payplug/Exception/PayplugServerException.php:7
- > PHP Fatal error
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 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: woocommerce, extension, shopping cart, gateway, payplug...
woocommerce-payplug/woocommerce-payplug.php 92% from 13 tests
The principal PHP file in "WooCommerce PayPlug" v. 3.5.3 is loaded by WordPress automatically on each request
It is important to fix the following:
- Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "2.6.0")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin51,981 lines of code in 218 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 158 | 7,548 | 17,314 | 32,219 |
PO File | 15 | 7,611 | 9,211 | 16,698 |
Sass | 25 | 391 | 77 | 2,457 |
Markdown | 1 | 68 | 0 | 214 |
JavaScript | 4 | 35 | 59 | 196 |
CSS | 14 | 24 | 0 | 170 |
JSON | 1 | 0 | 0 | 27 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
The following items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 44.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,907.00 |
Average method complexity | 4.38 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 93 | |
▷ Abstract classes | 4 | 4.30% |
▷ Concrete classes | 89 | 95.70% |
▷ Final classes | 0 | 0.00% |
Methods | 1,277 | |
▷ Static methods | 234 | 18.32% |
▷ Public methods | 927 | 72.59% |
▷ Protected methods | 21 | 1.64% |
▷ Private methods | 329 | 25.76% |
Functions | 95 | |
▷ Named functions | 94 | 98.95% |
▷ Anonymous functions | 1 | 1.05% |
Constants | 139 | |
▷ Global constants | 104 | 74.82% |
▷ Class constants | 35 | 25.18% |
▷ Public constants | 35 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/chart.png | 2.73KB | 2.09KB | ▼ 23.37% |
images/star.png | 1.51KB | 1.46KB | ▼ 3.37% |
assets/images/cards_logo.png | 4.94KB | 2.94KB | ▼ 40.46% |
images/payplug.png | 1.62KB | 1.82KB | 0.00% |
images/payplug-logo-large.png | 3.51KB | 2.78KB | ▼ 20.68% |