83% pagopar-woocommerce-gateway

Code Review | Pagopar - WooCommerce Gateway

WordPress plugin Pagopar - WooCommerce Gateway scored83%from 54 tests.

About plugin

  • Plugin page: pagopar-woocommer...
  • Plugin version: 2.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 23, 2018
  • Latest release: Jun 27, 2023
  • Number of updates: 118
  • Update frequency: every 16.8 days
  • Top authors: pagopar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /19,831 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.08ms] Passed 4 tests

An overview of server-side resources used by Pagopar - WooCommerce Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.19 ▼3.62
Dashboard /wp-admin3.31 ▲0.0045.99 ▼2.48
Posts /wp-admin/edit.php3.36 ▲0.0048.31 ▼0.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.11 ▼21.48
Media Library /wp-admin/upload.php3.23 ▲0.0036.10 ▲1.54

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 116 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Pagopar - WooCommerce Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.73 ▲0.351.66 ▼0.1641.94 ▼2.81
Dashboard /wp-admin2,198 ▲215.66 ▲0.0382.07 ▼4.4937.52 ▼9.18
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0538.63 ▼0.6435.18 ▲1.90
Add New Post /wp-admin/post-new.php1,526 ▼023.01 ▼0.62646.43 ▼67.2952.01 ▼8.20
Media Library /wp-admin/upload.php1,394 ▼64.21 ▲0.0295.45 ▼10.1641.21 ▼2.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/pagopar-woocommerce-gateway/includes/efectivo/pagopar_efectivo.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pagopar-woocommerce-gateway/dashboard-envio.php:113
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/pagopar-woocommerce-gateway/includes/tarjetas/pagopar_tarjetas.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pagopar-woocommerce-gateway/dashboard-configuracion-avanzada.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pagopar-woocommerce-gateway/pagopar-multimedios-pago.php:554
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/pagopar-woocommerce-gateway/dashboard-medios-pago.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/pagopar-woocommerce-gateway/dashboard-chequeo.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagopar-woocommerce-gateway/pagopar-direcciones.php:329
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pagopar-woocommerce-gateway/dashboard-footer.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/pagopar-woocommerce-gateway/dashboard-split-billing.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
  • License: No value
  • Donate link: Please fix this invalid url: ""
  • License uri: Please fix this invalid url: ""
The official readme.txt is a good inspiration

pagopar-woocommerce-gateway/woocommerce-pagopar-gateway.php 92% from 13 tests

The principal PHP file in "Pagopar - WooCommerce Gateway" v. 2.6.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pagopar-woocommerce-gateway.php" instead of "woocommerce-pagopar-gateway.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected10,812 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP272,9222,1428,967
CSS51551891,056
JavaScript917490671
Markdown1490118

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity192.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods98
▷ Static methods00.00%
▷ Public methods7879.59%
▷ Protected methods11.02%
▷ Private methods1919.39%
Functions129
▷ Named functions12697.67%
▷ Anonymous functions32.33%
Constants26
▷ Global constants00.00%
▷ Class constants26100.00%
▷ Public constants26100.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
69 PNG files occupy 0.26MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/footer/dark/practipago.png2.32KB1.62KB▼ 30.29%
images/footer/light/zimple.png2.72KB1.52KB▼ 44.01%
images/footer/dark/aquipago.png2.55KB1.72KB▼ 32.41%
images/medios-pagos/aquipago.png2.59KB1.72KB▼ 33.45%
images/footer/light/cabal.png2.41KB1.66KB▼ 31.26%