89% wc-payu-payment-gateway

Code Review | IMMAGIT PayU LATAM Payment Gateway for WooCommerce

WordPress plugin IMMAGIT PayU LATAM Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wc-payu-payment-g...
  • Plugin version: 1.1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Mar 3, 2022
  • Latest release: Oct 27, 2023
  • Number of updates: 11
  • Update frequency: every 54.9 days
  • Top authors: immagitoficial (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by IMMAGIT PayU LATAM Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.94 ▼0.86
Dashboard /wp-admin3.31 ▲0.0143.17 ▼2.05
Posts /wp-admin/edit.php3.36 ▲0.0043.76 ▼5.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.67 ▼17.88
Media Library /wp-admin/upload.php3.23 ▲0.0033.59 ▼0.50

Server storage [IO: ▲2.62MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for IMMAGIT PayU LATAM Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.28 ▲0.001.76 ▲0.1937.81 ▼7.42
Dashboard /wp-admin2,202 ▲255.53 ▼0.1481.42 ▼10.3138.72 ▼6.20
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0433.77 ▼1.0537.86 ▲4.03
Add New Post /wp-admin/post-new.php1,543 ▲1218.37 ▼4.68614.26 ▼34.3069.44 ▲2.31
Media Library /wp-admin/upload.php1,410 ▲104.26 ▲0.0496.81 ▼3.8842.02 ▼6.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: woocommerce, ecommerce, wordpress, payu, gateways...

wc-payu-payment-gateway/wc-payu-payment-gateway.php 77% from 13 tests

The main PHP file in "IMMAGIT PayU LATAM Payment Gateway for WooCommerce" ver. 1.1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.2" instead of "7.0")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin7,223 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PO File817,04048,2965,533
PHP71341011,689
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity71.60
▷ Minimum class complexity5.00
▷ Maximum class complexity163.00
Average method complexity6.69
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods62
▷ Static methods23.23%
▷ Public methods62100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/btnpay.png6.02KB2.62KB▼ 56.52%
assets/images/payulogoAR.png27.59KB9.03KB▼ 67.26%
assets/images/payulogoPE.png20.62KB7.14KB▼ 65.37%
assets/images/payulogoBR.png25.73KB8.48KB▼ 67.05%
assets/images/payulogoCO.png26.07KB8.78KB▼ 66.33%