89% woo-pagadito-payment-gateway

Code Review | WooCommerce Pagadito Payment Gateway

WordPress plugin WooCommerce Pagadito Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: woo-pagadito-paym...
  • Plugin version: 5.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.2
  • WordPress version: 6.3.1
  • First release: Apr 29, 2019
  • Latest release: May 13, 2023
  • Number of updates: 71
  • Update frequency: every 21.9 days
  • Top authors: pgdevelopers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /8,704 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
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.15ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Pagadito Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1735.12 ▼6.50
Dashboard /wp-admin3.48 ▲0.1748.52 ▼1.18
Posts /wp-admin/edit.php3.59 ▲0.2348.31 ▲0.44
Add New Post /wp-admin/post-new.php6.06 ▲0.1783.60 ▼9.36
Media Library /wp-admin/upload.php3.40 ▲0.1736.40 ▲1.66

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Pagadito Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.16 ▼1.431.79 ▼0.0141.72 ▼3.10
Dashboard /wp-admin2,214 ▲265.84 ▲0.94101.48 ▼12.9339.87 ▼5.59
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0439.91 ▲2.1236.66 ▲3.63
Add New Post /wp-admin/post-new.php1,550 ▲1718.55 ▼4.58598.10 ▼110.7160.09 ▼4.06
Media Library /wp-admin/upload.php1,399 ▲84.22 ▲0.0295.14 ▼3.1841.46 ▼2.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

woo-pagadito-payment-gateway/woo-pagadito-payment-gateway.php 92% from 13 tests

The main PHP script in "WooCommerce Pagadito Payment Gateway" version 5.1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "3.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin877 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3168297877

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity51.50
▷ Minimum class complexity27.00
▷ Maximum class complexity76.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods47
▷ Static methods00.00%
▷ Public methods3880.85%
▷ Protected methods00.00%
▷ Private methods919.15%
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
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/default.png2.71KB2.76KB0.00%
assets/images/light.png1.67KB1.72KB0.00%
assets/images/dark.png1.62KB1.68KB0.00%