Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼8.53ms] Passed 4 tests
This is a short check of server-side resources used by Transbank Webpay REST
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 34.35 ▼11.62 |
Dashboard /wp-admin | 3.31 ▲0.00 | 48.69 ▼6.56 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.42 ▼0.27 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 86.63 ▼15.68 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.43 ▲0.09 |
Server storage [IO: ▲5.78MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 555 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Transbank Webpay REST
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 14.48 ▲0.13 | 2.30 ▲0.49 | 41.04 ▼5.40 |
Dashboard /wp-admin | 2,203 ▲18 | 5.78 ▼0.08 | 101.04 ▼16.93 | 41.04 ▼5.01 |
Posts /wp-admin/edit.php | 2,086 ▼3 | 2.04 ▲0.06 | 37.91 ▲2.78 | 32.33 ▼0.97 |
Add New Post /wp-admin/post-new.php | 1,514 ▼8 | 17.75 ▼5.31 | 596.72 ▼217.44 | 58.92 ▼5.30 |
Media Library /wp-admin/upload.php | 1,388 ▲6 | 4.22 ▼0.04 | 95.34 ▼1.69 | 43.65 ▲1.53 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
The following issues need your attention
- 4× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/transbank-webpay-plus-rest/views/admin/components/info-validacion-webpay-oneclick-box.php
- > /wp-content/plugins/transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/examples/index.php
- > /wp-content/plugins/transbank-webpay-plus-rest/views/admin/components/credenciales-box.php
- > /wp-content/plugins/transbank-webpay-plus-rest/views/admin/components/info-validacion-webpay-plus-box.php
- 253× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
require_once(wp-content/plugins/transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/tests/bootstrap.php on line 3
- > PHP Fatal error
Trait 'Transbank\\Utils\\InteractsWithWebpayApi' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/src/Webpay/Oneclick/MallInscription.php on line 16
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
- > PHP Fatal error
Uncaught Error: Class 'Transbank\\Webpay\\WebpayPlus\\Responses\\TransactionCreateResponse' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/src/Webpay/WebpayPlus/Responses/MallTransactionCreateResponse.php:5
- > PHP Fatal error
Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php:21
- > PHP Fatal error
Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/psr/log/Psr/Log/Test/TestLogger.php:57
- > PHP Fatal error
Uncaught Error: Class 'Transbank\\Utils\\EnvironmentManager' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/src/Patpass/PatpassComercio.php:13
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/psr/log/Psr/Log/AbstractLogger.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Transbank\\Contracts\\RequestService' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/src/Utils/HttpClientRequestService.php:13
- > PHP Fatal error
Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/transbank-webpay-plus-rest/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php:19
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Screenshots: No descriptions were found for these screenshots #1, #2, #3 in transbank-webpay-plus-rest/assets to your readme.txt
transbank-webpay-plus-rest/webpay-rest.php 85% from 13 tests
The main PHP script in "Transbank Webpay REST" version 1.6.8 is automatically included on every request by WordPress
You should first fix the following items:
- Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.4.0")
- Main file name: Name the main plugin file the same as the plugin slug ("transbank-webpay-plus-rest.php" instead of "webpay-rest.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected74,921 lines of code in 518 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 446 | 6,315 | 13,450 | 44,216 |
SVG | 4 | 0 | 1 | 16,123 |
CSS | 16 | 3,695 | 69 | 8,469 |
Markdown | 21 | 1,404 | 0 | 4,247 |
JSON | 14 | 0 | 0 | 1,528 |
YAML | 8 | 27 | 3 | 166 |
JavaScript | 2 | 31 | 0 | 93 |
XML | 2 | 0 | 0 | 34 |
Dockerfile | 2 | 8 | 0 | 21 |
make | 1 | 8 | 0 | 19 |
Bourne Shell | 2 | 3 | 0 | 5 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 8.52 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 179.00 |
Average method complexity | 2.32 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 63 | |
Interfaces | 27 | |
Traits | 11 | |
Classes | 359 | |
▷ Abstract classes | 8 | 2.23% |
▷ Concrete classes | 351 | 97.77% |
▷ Final classes | 25 | 7.12% |
Methods | 2,256 | |
▷ Static methods | 322 | 14.27% |
▷ Public methods | 1,844 | 81.74% |
▷ Protected methods | 180 | 7.98% |
▷ Private methods | 232 | 10.28% |
Functions | 206 | |
▷ Named functions | 89 | 43.20% |
▷ Anonymous functions | 117 | 56.80% |
Constants | 364 | |
▷ Global constants | 43 | 11.81% |
▷ Class constants | 321 | 88.19% |
▷ Public constants | 321 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/webpay.png | 3.97KB | 2.10KB | ▼ 47.22% |
images/webpay-new.png | 10.96KB | 4.79KB | ▼ 56.25% |