77% webpayplus-pst

Code Review | Pago Fácil SpA - Múltiples medios de pagos en tu eCommerce

WordPress plugin Pago Fácil SpA - Múltiples medios de pagos en tu eCommerce scored77%from 54 tests.

About plugin

  • Plugin page: webpayplus-pst
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 6, 2016
  • Latest release: Sep 6, 2018
  • Number of updates: 14
  • Update frequency: every 52.9 days
  • Top authors: ctala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /6,898 total downloads

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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.60ms] Passed 4 tests

Analyzing server-side resources used by Pago Fácil SpA - Múltiples medios de pagos en tu eCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.81 ▼2.87
Dashboard /wp-admin3.36 ▲0.0647.89 ▼2.28
Posts /wp-admin/edit.php3.47 ▲0.1245.17 ▼0.24
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.45 ▼16.99
Media Library /wp-admin/upload.php3.28 ▲0.0534.24 ▲1.13

Server storage [IO: ▲1.00MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pago Fácil SpA - Múltiples medios de pagos en tu eCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.81 ▲0.441.83 ▼0.4742.47 ▼6.89
Dashboard /wp-admin2,206 ▲204.89 ▼0.99111.20 ▼11.8742.32 ▼1.00
Posts /wp-admin/edit.php2,086 ▼31.97 ▼0.0235.51 ▼0.9733.80 ▲0.85
Add New Post /wp-admin/post-new.php1,521 ▼023.29 ▲0.18581.64 ▼51.6251.03 ▼4.26
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0494.29 ▼7.5744.23 ▲1.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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 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
The following issues need your attention
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/webpayplus-pst/vendor/ctala/transaccion-default/templates/orden_fallida.php
    • > /wp-content/plugins/webpayplus-pst/views/views/admin/viewAdmin.php
    • > /wp-content/plugins/webpayplus-pst/vendor/ctala/transaccion-default/templates/orden_recibida.php
    • > /wp-content/plugins/webpayplus-pst/templates/orden_fallida.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: order_id in wp-content/plugins/webpayplus-pst/vendor/ctala/transaccion-default/templates/orden_fallida.php on line 9
    • > PHP Notice
      Undefined variable: order_id_mall in wp-content/plugins/webpayplus-pst/vendor/ctala/transaccion-default/templates/orden_fallida.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'ctala\\transaccion\\classes\\Transaccion' not found in wp-content/plugins/webpayplus-pst/vendor/ctala/transaccion-default/classes/Response.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'PagoFacil\\lib\\Operacion' not found in wp-content/plugins/webpayplus-pst/vendor/pagofacil/php-sdk/classes/Request.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/webpayplus-pst/vendor/ctala/transaccion-default/templates/orden_recibida.php on line 3
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/webpayplus-pst/vendor/ctala/transaccion-default/templates/orden_recibida.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/webpayplus-pst/classes/WC_Gateway_TBKAAS.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tbkaaswoogateway\\add_action() in wp-content/plugins/webpayplus-pst/tbkaas-woo-gateway.php:25
    • > PHP Notice
      Undefined variable: order_id in wp-content/plugins/webpayplus-pst/templates/orden_fallida.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/webpayplus-pst/templates/order_recibida.php:3

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: ecommerce, payments

webpayplus-pst/tbkaas-woo-gateway.php 77% from 13 tests

"Pago Fácil SpA - Múltiples medios de pagos en tu eCommerce" version 1.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("webpayplus-pst.php" instead of "tbkaas-woo-gateway.php")
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,697 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP303355671,532
JSON520130
Markdown319035

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.16
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods88
▷ Static methods1213.64%
▷ Public methods8293.18%
▷ Protected methods00.00%
▷ Private methods66.82%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.91MB with 0.54MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png25.41KB9.36KB▼ 63.16%
assets/images/logo.png5.92KB3.02KB▼ 49.08%
assets/banner-1544x500.png901.55KB320.98KB▼ 64.40%