Benchmarks
Plugin footprint Passed 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.01MB] [CPU: ▼150.02ms] Passed 4 tests
A check of server-side resources used by Onepay para WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.86 ▲0.14 | 23.45 ▲3.86 |
Dashboard /wp-admin | 3.15 ▲0.09 | 32.56 ▼14.94 |
Posts /wp-admin/edit.php | 3.20 ▲0.10 | 34.69 ▼10.06 |
Add New Post /wp-admin/post-new.php | 5.16 ▼0.27 | 76.40 ▼565.93 |
Media Library /wp-admin/upload.php | 3.15 ▲0.14 | 29.63 ▼9.14 |
Server storage [IO: ▲0.30MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 81 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Onepay para WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,345 ▼261 | 15.72 ▲0.20 | 0.41 ▼7.59 | 10.40 ▼32.95 |
Dashboard /wp-admin | 3,063 ▲132 | 6.19 ▲0.21 | 141.04 ▼8.64 | 105.93 ▼4.52 |
Posts /wp-admin/edit.php | 2,835 ▲96 | 2.83 ▲0.14 | 74.32 ▲7.31 | 95.09 ▲6.30 |
Add New Post /wp-admin/post-new.php | 1,678 ▼5 | 21.47 ▲2.73 | 282.29 ▼80.93 | 105.27 ▼0.77 |
Media Library /wp-admin/upload.php | 1,901 ▲94 | 5.04 ▲0.01 | 144.37 ▼16.05 | 116.63 ▼3.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully
Smoke tests 75% from 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)
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'OnePay\\SDK\\Requests\\AbstractRequest' not found in wp-content/plugins/onepay-for-woocommerce/vendor/OnePay/SDK/Requests/Estabelecimento/GetWebhookRequest.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/onepay-for-woocommerce/uninstall.php:3
- > PHP Fatal error
Uncaught Error: Class 'OnePay\\SDK\\Requests\\AbstractRequest' not found in wp-content/plugins/onepay-for-woocommerce/vendor/OnePay/SDK/Requests/Pagamento/PagamentoRequest.php:7
- > PHP Fatal error
Uncaught Error: Class 'OnePay\\SDK\\Requests\\AbstractRequest' not found in wp-content/plugins/onepay-for-woocommerce/vendor/OnePay/SDK/Requests/Pagamento/StatusRequest.php:7
- > PHP Fatal error
Uncaught Error: Class 'OnePay\\SDK\\Requests\\AbstractRequest' not found in wp-content/plugins/onepay-for-woocommerce/vendor/OnePay/SDK/Requests/Pagamento/RefundRequest.php:7
- > PHP Fatal error
Uncaught Error: Class 'OnePay\\SDK\\Requests\\AbstractRequest' not found in wp-content/plugins/onepay-for-woocommerce/vendor/OnePay/SDK/Requests/Estabelecimento/AddWebhookRequest.php:7
- > PHP Fatal error
Uncaught Error: Interface 'OnePay\\SDK\\Requests\\InterfaceRequest' not found in wp-content/plugins/onepay-for-woocommerce/vendor/OnePay/SDK/Requests/AbstractRequest.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
- Screenshots: These screenshots lack descriptions #5, #6 in onepay-for-woocommerce/assets to your readme.txt
onepay-for-woocommerce/wc-onepay.php 85% from 13 tests
"Onepay para WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("onepay-for-woocommerce.php" instead of "wc-onepay.php")
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 plugin4,420 lines of code in 65 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 53 | 999 | 1,646 | 3,425 |
JavaScript | 8 | 137 | 90 | 655 |
PO File | 1 | 118 | 166 | 328 |
CSS | 2 | 1 | 4 | 11 |
JSON | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 9.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 2.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 1 | |
Traits | 3 | |
Classes | 32 | |
▷ Abstract classes | 2 | 6.25% |
▷ Concrete classes | 30 | 93.75% |
▷ Final classes | 1 | 3.33% |
Methods | 294 | |
▷ Static methods | 30 | 10.20% |
▷ Public methods | 281 | 95.58% |
▷ Protected methods | 7 | 2.38% |
▷ Private methods | 6 | 2.04% |
Functions | 14 | |
▷ Named functions | 13 | 92.86% |
▷ Anonymous functions | 1 | 7.14% |
Constants | 21 | |
▷ Global constants | 8 | 38.10% |
▷ Class constants | 13 | 61.90% |
▷ Public constants | 13 | 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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/gateway/methods/creditcard/assets/public/img/logo_horizontal_min.png | 3.44KB | 2.09KB | ▼ 39.17% |
includes/gateway/methods/boleto/assets/public/img/logo_horizontal_min.png | 3.44KB | 2.09KB | ▼ 39.17% |