89% tryba-for-wc

Code Review | Tryba Payment Gateway for WooCommerce

WordPress plugin Tryba Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: tryba-for-wc
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2021
  • Latest release: Jan 19, 2023
  • Number of updates: 17
  • Update frequency: every 29.0 days
  • Top authors: trybaio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /927 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Tryba Payment Gateway for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.01 ▼3.76
Dashboard /wp-admin3.31 ▼0.0347.17 ▼16.69
Posts /wp-admin/edit.php3.36 ▲0.0149.58 ▲8.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.62 ▼25.40
Media Library /wp-admin/upload.php3.24 ▲0.0136.90 ▲1.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tryba Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.331.72 ▼0.1236.97 ▼8.10
Dashboard /wp-admin2,206 ▲154.87 ▼0.0497.31 ▼5.8137.94 ▼0.70
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0241.86 ▲0.8635.22 ▲0.55
Add New Post /wp-admin/post-new.php1,535 ▲723.20 ▲4.98666.97 ▲48.6851.47 ▼9.73
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.01108.99 ▲9.1546.88 ▲3.16

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP 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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: woo, tryba, woocommerce, payment

tryba-for-wc/woo-tryba.php 85% from 13 tests

The primary PHP file in "Tryba Payment Gateway for WooCommerce" version 1.3.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.5" instead of "5.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tryba-for-wc.php" instead of "woo-tryba.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin341 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP252116341

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/tryba_logo.png28.16KB11.01KB▼ 60.89%