Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▼1.16MB] [CPU: ▼341.63ms] Passed 4 tests
Analyzing server-side resources used by Yourpay Payment Platform for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.28 ▼0.23 | 18.89 ▼33.72 |
Dashboard /wp-admin | 3.20 ▼0.21 | 15.22 ▼17.79 |
Posts /wp-admin/edit.php | 3.21 ▼0.44 | 17.07 ▼19.53 |
Add New Post /wp-admin/post-new.php | 3.20 ▼3.77 | 15.89 ▼1,295.49 |
Media Library /wp-admin/upload.php | 3.20 ▼0.10 | 14.61 ▼17.41 |
Callbacks /wp-admin/admin.php?page=yourpay_callbacks | 3.20 | 17.74 |
Payout Data /wp-admin/admin.php?page=yourpay_payouts_data | 3.20 | 19.14 |
Payouts /wp-admin/admin.php?page=yourpay_payouts | 3.20 | 15.55 |
Settings /wp-admin/admin.php?page=yourpay_settings | 3.20 | 16.21 |
Yourpay Home /wp-admin/admin.php?page=yourpay_admin | 3.20 | 14.81 |
Server storage [IO: ▲0.38MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 1 new option
New WordPress options |
---|
recovery_mode_email_last_sent |
Browser metrics Passed 4 tests
An overview of browser requirements for Yourpay Payment Platform for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,812 ▲58 | 15.61 ▼0.10 | 5.78 ▼0.86 | 2.27 ▼1.24 |
Dashboard /wp-admin | 2,939 ▲81 | 6.08 ▼0.10 | 120.94 ▼18.78 | 160.73 ▼3.78 |
Posts /wp-admin/edit.php | 2,735 ▲44 | 3.24 ▼0.13 | 63.75 ▼2.45 | 137.48 ▼6.23 |
Add New Post /wp-admin/post-new.php | 1,693 ▲3 | 21.79 ▲1.23 | 410.87 ▼36.03 | 153.64 ▼14.27 |
Media Library /wp-admin/upload.php | 1,749 ▲51 | 5.53 ▲0.04 | 147.64 ▲6.69 | 190.21 ▼1.20 |
Callbacks /wp-admin/admin.php?page=yourpay_callbacks | 890 | 1.97 | 37.32 | 86.41 |
Payout Data /wp-admin/admin.php?page=yourpay_payouts_data | 848 | 1.97 | 37.89 | 59.05 |
Payouts /wp-admin/admin.php?page=yourpay_payouts | 890 | 1.97 | 37.28 | 85.15 |
Settings /wp-admin/admin.php?page=yourpay_settings | 1,140 | 2.37 | 55.94 | 115.02 |
Yourpay Home /wp-admin/admin.php?page=yourpay_admin | 1,051 | 2.41 | 54.15 | 112.25 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Warning in wp-includes/class-wp-hook.php+307
call_user_func_array() expects parameter 1 to be a valid callback, class 'WC_Yourpay2_0' not found
- This plugin did not uninstall successfully, leaving 1 option in the database
- recovery_mode_email_last_sent
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 5 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=yourpay_admin
- > Warning in wp-includes/class-wp-hook.php+307
call_user_func_array() expects parameter 1 to be a valid callback, class 'WC_Yourpay2_0' not found
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=yourpay_payouts
- > Notice in wp-content/plugins/yourpay/sdk.php+56
Trying to access array offset on value of type bool
- > GET request to /wp-admin/admin.php?page=yourpay_callbacks
- > Error in wp-content/plugins/yourpay/sdk.php+61
Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/yourpay/sdk.php:61
Stack trace:
#0 wp-content/plugins/yourpay/yourpay.php(362): yourpay_sdk::v43requestresponse()
#1 wp-admin/includes/template.php(1694): yourpay::callbacks_list_output()
#2 wp-content/plugins/yourpay/yourpay.php(348): do_settings_sections()
#3 wp-includes/class-wp-hook.php(307): yourpay::callbacks()
#4 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#5 wp-includes/plugin.php(474): WP_Hook->do_action()
#6 wp-admin/admin.php(259): do_action()
#7 {main}
thrown- > GET request to /wp-admin/admin.php?page=yourpay_payouts
- > Error in wp-content/plugins/yourpay/sdk.php+61
Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/yourpay/sdk.php:61
Stack trace:
#0 wp-content/plugins/yourpay/yourpay.php(261): yourpay_sdk::v43requestresponse()
#1 wp-admin/includes/template.php(1694): yourpay::payouts_list_output()
#2 wp-content/plugins/yourpay/yourpay.php(248): do_settings_sections()
#3 wp-includes/class-wp-hook.php(307): yourpay::payouts()
#4 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#5 wp-includes/plugin.php(474): WP_Hook->do_action()
#6 wp-admin/admin.php(259): do_action()
#7 {main}
thrown
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/yourpay/woocommerce-gateway-yourpay.php
- > /wp-content/plugins/yourpay/syncronize.php
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/yourpay/woocommerce-blocks/yourpay/yourpay.php:20
- > PHP Fatal error
Uncaught Error: Class 'WC_Yourpay_Instance' not found in wp-content/plugins/yourpay/platforms/viabill.php:3
- > PHP Fatal error
Uncaught Error: Class 'WC_Yourpay_Instance' not found in wp-content/plugins/yourpay/platforms/mobilepay.php:3
- > PHP Fatal error
Uncaught Error: Class 'WC_Yourpay_Instance' not found in wp-content/plugins/yourpay/platforms/pos.php:3
- > PHP Fatal error
Uncaught Error: Class 'WC_Yourpay2_0' not found in wp-content/plugins/yourpay/platforms/instance.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 81% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
- Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line (
=== yourpay ===
) - Tags: There are too many tags (14 tag instead of maximum 10)
- Requires at least: Version not formatted correctly
yourpay/woocommerce-gateway-yourpay.php 85% from 13 tests
The main PHP file in "Yourpay Payment Platform for WooCommerce" ver. 4.0.13 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Text Domain: The text domain name should consist of only dashes and lowercase characters
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yourpay.php" instead of "woocommerce-gateway-yourpay.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,489 lines of code in 28 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 371 | 145 | 1,883 |
CSS | 4 | 23 | 9 | 243 |
JavaScript | 6 | 11 | 25 | 171 |
PO File | 1 | 47 | 49 | 118 |
XML | 4 | 0 | 0 | 74 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 18.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 109.00 |
Average method complexity | 2.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 2 | 20.00% |
Methods | 112 | |
▷ Static methods | 41 | 36.61% |
▷ Public methods | 103 | 91.96% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 9 | 8.04% |
Functions | 18 | |
▷ Named functions | 18 | 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
PNG files should be compressed to save space and minimize bandwidth usage
31 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/platformlogos/yourpay_logo-128x128.png | 5.97KB | 3.25KB | ▼ 45.51% |
assets/images/cards/paypal.png | 0.94KB | 0.97KB | 0.00% |
assets/images/cards/diners.png | 1.41KB | 1.50KB | 0.00% |
assets/images/cards/paii.png | 0.78KB | 0.82KB | 0.00% |
assets/images/cards/americanexpress.png | 3.01KB | 3.07KB | 0.00% |