83% woocommerce-payu-latam-gateway

Code Review | WooCommerce - PayU Latam Gateway

WordPress plugin WooCommerce - PayU Latam Gateway scored 83% from 54 tests.

About plugin

  • Plugin page: woocommerce-payu-...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6
  • WordPress version: 6.3.1
  • First release: Nov 30, 2013
  • Latest release: Sep 22, 2016
  • Number of updates: 72
  • Update frequency: every 14.3 days
  • Top authors: deusnoname (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

4,000+ active / 51,990 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: ▼2.54ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce - PayU Latam Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.02 ▼2.42
Dashboard /wp-admin3.31 ▲0.0048.32 ▼1.52
Posts /wp-admin/edit.php3.36 ▲0.0044.07 ▼1.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.74 ▼4.64
Media Library /wp-admin/upload.php3.23 ▲0.0035.14 ▲1.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce - PayU Latam Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.29 ▲0.071.74 ▲0.1038.62 ▼7.10
Dashboard /wp-admin2,209 ▼04.88 ▼0.9897.23 ▼11.6139.80 ▼4.70
Posts /wp-admin/edit.php2,089 ▲32.02 ▲0.0233.49 ▼2.0933.25 ▲0.68
Add New Post /wp-admin/post-new.php1,537 ▲923.37 ▼0.06622.69 ▼43.6158.92 ▼17.92
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.1093.24 ▼18.8341.52 ▼7.62

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-payu-latam-gateway/woocommerce-gateway-payulatam.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === woocommerce-payu-latam-gateway === )
The official readme.txt might help

woocommerce-payu-latam-gateway/woocommerce-gateway-payulatam.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce - PayU Latam Gateway" version 1.2.3
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-payu-latam-gateway.php" instead of "woocommerce-gateway-payulatam.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,203 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1114168606
PO File3176268468
Markdown1630129

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity83.00
▷ Minimum class complexity83.00
▷ Maximum class complexity83.00
Average method complexity5.56
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
12 PNG files occupy 0.48MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/payulogo.png6.30KB2.39KB▼ 61.97%
assets/img/payulogoAR.png34.08KB12.91KB▼ 62.11%
assets/screenshot-1.png137.31KB50.21KB▼ 63.44%
assets/img/logo.png4.84KB3.07KB▼ 36.71%
assets/screenshot-3.png93.15KB33.54KB▼ 63.99%