99% directo-pago-payments-for-woocommerce

Code Review | Directo Pago payments for WooCommerce

WordPress plugin Directo Pago payments for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: directo-pago-paym...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7.3
  • WordPress version: 5.8.1
  • First release: Aug 21, 2020
  • Latest release: Oct 13, 2021
  • Number of updates: 25
  • Update frequency: every 16.8 days
  • Top authors: pablokamil (92%)dagriel (12%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 655 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.00ms] Passed 4 tests

Analyzing server-side resources used by Directo Pago payments for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.39 ▲15.68
Dashboard /wp-admin3.07 ▲0.0147.57 ▼5.60
Posts /wp-admin/edit.php3.12 ▲0.0152.48 ▲9.19
Add New Post /wp-admin/post-new.php5.42 ▼0.0187.20 ▼564.50
Media Library /wp-admin/upload.php3.01 ▲0.0132.15 ▼3.07

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Directo Pago payments for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.25 ▲0.668.13 ▼0.6250.96 ▲4.95
Dashboard /wp-admin2,970 ▲395.88 ▼0.05157.88 ▲10.02119.88 ▲9.11
Posts /wp-admin/edit.php2,736 ▼02.70 ▲0.0166.27 ▲2.9689.08 ▼5.31
Add New Post /wp-admin/post-new.php1,875 ▲37519.27 ▲0.43375.37 ▲12.65110.45 ▼4.27
Media Library /wp-admin/upload.php1,810 ▼35.01 ▼0.01151.49 ▲11.87118.58 ▲0.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

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)
Everything seems fine on the user side


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 your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

directo-pago-payments-for-woocommerce/woocommerce-directopago-checkout.php 92% from 13 tests

The principal PHP file in "Directo Pago payments for WooCommerce" v. 1.0.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("directo-pago-payments-for-woocommerce.php" instead of "woocommerce-directopago-checkout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin873 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PO File9189216648

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods321.43%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ 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
There are no PNG files in this plugin