Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼2.66ms] Passed 4 tests
Server-side resources used by Migración de Medio de Pago Webpay Plus SOAP a REST de Transbank para WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 39.31 ▼1.86 |
Dashboard /wp-admin | 3.31 ▲0.00 | 47.22 ▼0.80 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 44.96 ▼1.62 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 84.54 ▼5.42 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.54 ▼1.74 |
Server storage [IO: ▲31.67MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
- The filesystem usage should be lower than 25MB (currently using 31.67MB)
Filesystem: 704 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Migración de Medio de Pago Webpay Plus SOAP a REST de Transbank para WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,825 ▲79 | 14.42 ▼0.22 | 2.05 ▲0.25 | 44.33 ▼1.74 |
Dashboard /wp-admin | 2,206 ▲18 | 5.83 ▼0.02 | 97.43 ▼4.79 | 39.18 ▼2.75 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.06 ▲0.06 | 36.26 ▼0.59 | 32.36 ▼2.66 |
Add New Post /wp-admin/post-new.php | 1,537 ▲9 | 23.12 ▲4.96 | 683.39 ▲86.22 | 48.06 ▼2.95 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.20 ▼0.07 | 92.53 ▼15.75 | 40.98 ▼4.55 |
Uninstaller [IO: ▲31.67MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the followingThis plugin does not fully uninstall, leaving 7 options in the database
- Uninstall procedure validation failed for this plugin
- > Error in wp-content/plugins/wc-transbank-webpay-plus-rest/wc-transbank-webpay-plus-rest.php+304
Uncaught Error: Class 'Transbank\WooCommerce\WebpayRest\TransbankWebpayOrders' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/wc-transbank-webpay-plus-rest.php:304
Stack trace:
#0 wp-includes/class-wp-hook.php(310): transbank_rest_remove_database()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(1269): do_action()
#4 wp-admin/includes/plugin.php(960): uninstall_plugin() - Incomplete uninstall procedure, leaving 704 files (31.67MB) in the plugin directory
- (new file) libwebpay/css/ReportPdf.css
- (new file) assets/img/back.png
- (new file) composer.json
- (new file) libwebpay/admin-options.php
- (new file) assets/img/whatsapp.svg
- (new file) libwebpay/ConfigProvider.php
- (new file) libwebpay/images/webpay.png
- (new file) assets/img/logo_webpay.png
- (new file) readme.txt
- (new file) composer.lock
- ...
- db_upgraded
- recovery_mode_email_last_sent
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- 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
The smoke test was a success, however most plugin functionality was not tested
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
Please fix the following
- 82× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/example_034.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/example_054.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/barcodes/example_1d_png.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/example_031.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/example_064.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/example_020.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/example_004.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/example_011.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_qrcode_png.php
- > /wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/barcodes/example_1d_html.php
- 106× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to a member function format() on null in wp-content/plugins/wc-transbank-webpay-plus-rest/views/order-summary.php:25
- > PHP Notice
Undefined variable: finalResponse in wp-content/plugins/wc-transbank-webpay-plus-rest/views/order-summary.php on line 17
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/tests/OnepaySignUtilTest.php:13
- > PHP Fatal error
Uncaught Error: Class 'Transbank\\Onepay\\BaseResponse' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/lib/onepay/TransactionCreateResponse.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/guzzlehttp/promises/src/Promise.php:9
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
- > PHP Fatal error
Uncaught Error: Class 'Transbank\\Onepay\\Exceptions\\TransbankException' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/transbank/transbank-sdk/lib/onepay/exceptions/RefundCreateException.php:10
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/guzzlehttp/guzzle/src/Pool.php:20
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Requires php: Version not formatted correctly
- Tags: There are too many tags (14 tag instead of maximum 10)
wc-transbank-webpay-plus-rest/wc-transbank-webpay-plus-rest.php 85% from 13 tests
The entry point to "Migración de Medio de Pago Webpay Plus SOAP a REST de Transbank para WooCommerce" version 2021.03.22 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
- Plugin Name: Please shorten the plugin name (currently 81 characters long instead of max. 70)
- Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.4.0")
Code Analysis 0% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
These items require your attention
- Do not distribute dangerous files with your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/wc-transbank-webpay-plus-rest/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 497 | 8,785 | 25,805 | 76,269 |
Markdown | 18 | 1,141 | 0 | 3,552 |
SVG | 4 | 1 | 1 | 1,883 |
JSON | 12 | 0 | 0 | 1,223 |
CSS | 1 | 5 | 0 | 47 |
make | 2 | 12 | 0 | 28 |
Dockerfile | 2 | 8 | 0 | 22 |
XML | 1 | 0 | 0 | 15 |
YAML | 2 | 0 | 0 | 14 |
Bourne Shell | 1 | 1 | 0 | 2 |
PHP code 0% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,379)
- Please reduce cyclomatic complexity of methods to less than 100 (currently 502)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 27.65 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,379.00 |
Average method complexity | 4.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 502.00 |
Code structure | ||
---|---|---|
Namespaces | 34 | |
Interfaces | 15 | |
Traits | 2 | |
Classes | 305 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 305 | 100.00% |
▷ Final classes | 19 | 6.23% |
Methods | 2,464 | |
▷ Static methods | 423 | 17.17% |
▷ Public methods | 2,012 | 81.66% |
▷ Protected methods | 298 | 12.09% |
▷ Private methods | 154 | 6.25% |
Functions | 214 | |
▷ Named functions | 122 | 57.01% |
▷ Anonymous functions | 92 | 42.99% |
Constants | 371 | |
▷ Global constants | 182 | 49.06% |
▷ Class constants | 189 | 50.94% |
▷ Public constants | 189 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.70MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/logo_webpay.png | 14.54KB | 6.90KB | ▼ 52.53% |
vendor/tecnickcom/tcpdf/examples/images/tcpdf_cell.png | 37.51KB | 36.62KB | ▼ 2.39% |
libwebpay/images/webpay.png | 5.89KB | 2.46KB | ▼ 58.20% |
vendor/tecnickcom/tcpdf/examples/images/img.png | 190.57KB | 64.69KB | ▼ 66.06% |
vendor/tecnickcom/tcpdf/examples/images/alpha.png | 23.33KB | 30.34KB | 0.00% |