89% dlocal-go-payments-for-woocommerce

Code Review | dLocal Go payments for WooCommerce

WordPress plugin dLocal Go payments for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: dlocal-go-payment...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 25, 2022
  • Latest release: Jul 31, 2023
  • Number of updates: 11
  • Update frequency: every 22.5 days
  • Top authors: dlocalgo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /1,634 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼3.75ms] Passed 4 tests

Server-side resources used by dLocal Go payments for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.29 ▼3.43
Dashboard /wp-admin3.31 ▲0.0149.10 ▲0.52
Posts /wp-admin/edit.php3.36 ▲0.0146.31 ▼3.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.93 ▼8.42
Media Library /wp-admin/upload.php3.24 ▲0.0135.61 ▲0.58

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

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

Browser metrics Passed 4 tests

dLocal Go payments for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.65 ▼0.731.86 ▼0.1044.70 ▼4.70
Dashboard /wp-admin2,209 ▲245.89 ▼0.01101.30 ▼0.1852.00 ▲11.27
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0435.41 ▼6.1234.00 ▼2.51
Add New Post /wp-admin/post-new.php1,536 ▲1723.43 ▲0.21642.59 ▲44.3656.91 ▲4.35
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0196.55 ▼2.4341.41 ▼3.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can look at the official readme.txt

dlocal-go-payments-for-woocommerce/woocommerce-dlocalgo-checkout.php 92% from 13 tests

The main PHP script in "dLocal Go payments for WooCommerce" version 1.0.6 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dlocal-go-payments-for-woocommerce.php" instead of "woocommerce-dlocalgo-checkout.php")

Code Analysis Passed 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
There were no executable files found in this plugin695 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP497163468
PO File27682227

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.00
▷ Minimum class complexity12.00
▷ Maximum class complexity38.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2288.00%
▷ Protected methods312.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin