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.01MB] [CPU: ▼4.03ms] Passed 4 tests
Server-side resources used by HitPay Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 42.15 ▼0.70 |
Dashboard /wp-admin | 3.31 ▲0.01 | 54.51 ▲2.73 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 48.51 ▼0.62 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 86.66 ▼16.78 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 40.00 ▲1.98 |
Server storage [IO: ▲4.07MB] [DB: ▲0.07MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 260 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for HitPay Payment Gateway for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.38 ▲0.10 | 1.70 ▼0.17 | 42.56 ▼2.60 |
Dashboard /wp-admin | 2,198 ▲21 | 5.60 ▼0.10 | 92.62 ▲0.09 | 40.51 ▼2.45 |
Posts /wp-admin/edit.php | 2,100 ▲3 | 2.00 ▼0.02 | 40.08 ▲2.85 | 37.57 ▲1.91 |
Add New Post /wp-admin/post-new.php | 1,546 ▲14 | 23.15 ▼0.20 | 668.51 ▼23.75 | 55.73 ▲3.71 |
Media Library /wp-admin/upload.php | 1,397 ▲6 | 4.23 ▲0.02 | 108.10 ▲9.72 | 47.31 ▲4.71 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/hitpay-payment-gateway/vendor/softbuild/hitpay-sdk/Examples/ClientExample.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'HitPay\\Request' not found in wp-content/plugins/hitpay-payment-gateway/vendor/softbuild/hitpay-sdk/src/Client.php:15
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/hitpay-payment-gateway/includes/regular-checkout.php:14
- > PHP Fatal error
Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/hitpay-payment-gateway/trunk/includes/regular-checkout.php:14
- > PHP Warning
require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/hitpay-payment-gateway/trunk/vendor/softbuild/hitpay-sdk/Examples/ClientExample.php on line 3
- > PHP Warning
require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/hitpay-payment-gateway/vendor/softbuild/hitpay-sdk/Examples/ClientExample.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'HitPay\\Request' not found in wp-content/plugins/hitpay-payment-gateway/trunk/vendor/softbuild/hitpay-sdk/src/Client.php:15
- > PHP Fatal error
Uncaught Error: Class 'HitPay\\Response\\CreatePayment' not found in wp-content/plugins/hitpay-payment-gateway/vendor/softbuild/hitpay-sdk/src/Response/PaymentStatus.php:10
- > PHP Fatal error
Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/hitpay-payment-gateway/trunk/includes/blocks-checkout.php:14
- > PHP Fatal error
Uncaught Error: Class 'HitPay\\Response\\CreatePayment' not found in wp-content/plugins/hitpay-payment-gateway/trunk/vendor/softbuild/hitpay-sdk/src/Response/PaymentStatus.php:10
- > PHP Fatal error
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 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: A description for screenshot #3 is required in hitpay-payment-gateway/assets to your readme.txt
hitpay-payment-gateway/hitpay-payment-gateway.php 92% from 13 tests
The main file in "HitPay Payment Gateway for WooCommerce" v. 4.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 212 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,346 lines of code in 75 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 535 | 882 | 2,594 |
SVG | 46 | 0 | 1 | 482 |
JavaScript | 2 | 21 | 0 | 98 |
CSS | 1 | 11 | 0 | 93 |
JSON | 2 | 0 | 0 | 57 |
Dockerfile | 1 | 3 | 1 | 15 |
YAML | 1 | 1 | 0 | 7 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 19.15 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 136.00 |
Average method complexity | 2.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 26 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 26 | 100.00% |
▷ Final classes | 2 | 7.69% |
Methods | 336 | |
▷ Static methods | 8 | 2.38% |
▷ Public methods | 318 | 94.64% |
▷ Protected methods | 6 | 1.79% |
▷ Private methods | 12 | 3.57% |
Functions | 30 | |
▷ Named functions | 26 | 86.67% |
▷ Anonymous functions | 4 | 13.33% |
Constants | 78 | |
▷ Global constants | 66 | 84.62% |
▷ Class constants | 12 | 15.38% |
▷ Public constants | 12 | 100.00% |
Plugin size 0% from 2 tests
Image compression 0% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
80 PNG files occupy 2.79MB with 1.82MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
trunk/assets/screenshots/6-Drop-in_Enable.png | 120.92KB | 38.58KB | ▼ 68.09% |
assets/images/wechat.png | 2.84KB | 1.56KB | ▼ 45.16% |
assets/images/psbank.png | 5.25KB | 2.24KB | ▼ 57.24% |
(invalid) assets/images/chinabank.png | 133.29KB | 0.00KB | ▼ 100.00% |
assets/screenshots/4.png | 63.02KB | 27.61KB | ▼ 56.19% |