90% tuyo-pay-gateway

Code Review | Tuyo Pay Gateway Plugin

WordPress plugin Tuyo Pay Gateway Plugin scored90%from 54 tests.

About plugin

  • Plugin page: tuyo-pay-gateway
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Mar 14, 2023
  • Latest release: Aug 10, 2023
  • Number of updates: 11
  • Update frequency: every 14.4 days
  • Top authors: agodin3z (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Tuyo Pay Gateway Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.94 ▼4.49
Dashboard /wp-admin3.32 ▼0.0349.65 ▼15.06
Posts /wp-admin/edit.php3.37 ▲0.0149.92 ▲3.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.67 ▼12.77
Media Library /wp-admin/upload.php3.24 ▲0.0136.98 ▲1.52

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tuyo Pay Gateway Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.25 ▼0.101.61 ▼0.4543.91 ▲1.86
Dashboard /wp-admin2,202 ▲255.69 ▲0.0384.85 ▼12.0141.18 ▼2.83
Posts /wp-admin/edit.php2,104 ▲11.95 ▼0.0639.69 ▲5.0736.26 ▲0.69
Add New Post /wp-admin/post-new.php1,533 ▼423.63 ▲5.12687.72 ▲31.5860.41 ▼2.07
Media Library /wp-admin/upload.php1,410 ▲74.17 ▼0.0499.56 ▼9.0645.56 ▼3.12

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: checkout, tuyo, payments, store, el salvador...

tuyo-pay-gateway/tuyo-pay-gateway.php Passed 13 tests

This is the main PHP file of "Tuyo Pay Gateway Plugin" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
54 characters long description:
Plugin WooCommerce para la pasarela de pagos Tuyo Pay.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin622 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10124245616
CSS1106

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.62
▷ Minimum class complexity4.00
▷ Maximum class complexity21.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods44
▷ Static methods1534.09%
▷ Public methods4295.45%
▷ Protected methods12.27%
▷ Private methods12.27%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants323.08%
▷ Class constants1076.92%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tuyopay-full.png2.31KB2.01KB▼ 12.70%
assets/img/tuyopay-white.png1.74KB1.90KB0.00%
assets/img/tuyopay-logo.png2.73KB2.09KB▼ 23.20%
assets/img/tuyopay-green.png2.56KB1.90KB▼ 25.72%