89% payment-gateway-via-borgun-rpg-for-woocommerce

Code Review | Payment gateway via Teya RPG for WooCommerce

WordPress plugin Payment gateway via Teya RPG for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: payment-gateway-v...
  • Plugin version: 1.0.24
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Nov 13, 2020
  • Latest release: Nov 9, 2023
  • Number of updates: 18
  • Update frequency: every 60.6 days
  • Top authors: tacticais (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,604 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.47ms] Passed 4 tests

A check of server-side resources used by Payment gateway via Teya RPG for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.80 ▼3.96
Dashboard /wp-admin3.36 ▲0.0556.20 ▲9.56
Posts /wp-admin/edit.php3.48 ▲0.1246.82 ▲0.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.13 ▼3.08
Media Library /wp-admin/upload.php3.29 ▲0.0531.78 ▲0.50

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment gateway via Teya RPG for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.18 ▼0.532.10 ▲0.0445.05 ▲0.73
Dashboard /wp-admin2,198 ▲215.60 ▼0.0795.10 ▲6.1941.82 ▲2.36
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0235.98 ▼4.5932.56 ▼4.35
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.07638.73 ▼50.1248.61 ▼14.02
Media Library /wp-admin/upload.php1,397 ▼04.20 ▲0.03101.53 ▼3.2442.72 ▼0.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: Please take inspiration from this readme.txt

payment-gateway-via-borgun-rpg-for-woocommerce/borgun-rpg.php 77% from 13 tests

"Payment gateway via Teya RPG for WooCommerce" version 1.0.24's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("payment-gateway-via-borgun-rpg-for-woocommerce.php" instead of "borgun-rpg.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,001 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP513594884
JavaScript283105
CSS10012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity34.00
▷ Minimum class complexity9.00
▷ Maximum class complexity107.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods3780.43%
▷ Protected methods613.04%
▷ Private methods36.52%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
cards.png17.99KB5.81KB▼ 67.69%