99% woo-tbc-payment-gateway

Code Review | WooCommerce TBC Credit Card Payment Gateway (Free)

WordPress plugin WooCommerce TBC Credit Card Payment Gateway (Free) scored 99% from 53 tests.

About plugin

  • Plugin page: woo-tbc-payment-g...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.2
  • WordPress version: 5.8.1
  • First release: Jun 15, 2016
  • Latest release: Jun 9, 2019
  • Number of updates: 16
  • Update frequency: every 69.6 days
  • Top authors: wearedecom (56.25%)sandrodz (37.5%)plugandpay (18.75%)

Code review

53 tests

User reviews

4 reviews

Install metrics

100+ active / 5,100 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼888.10ms] Passed 4 tests

A check of server-side resources used by WooCommerce TBC Credit Card Payment Gateway (Free)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1334.28 ▲13.72
Dashboard /wp-admin3.69 ▲0.6456.44 ▲17.26
Posts /wp-admin/edit.php3.20 ▲0.0976.83 ▲31.86
Add New Post /wp-admin/post-new.php5.45 ▲0.121,496.72 ▼3,587.25
Media Library /wp-admin/upload.php3.02 ▲0.0231.21 ▲3.88

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce TBC Credit Card Payment Gateway (Free)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲25115.89 ▲0.239.17 ▲1.0345.54 ▼0.68
Dashboard /wp-admin3,107 ▲2575.95 ▲0.09131.33 ▼4.06132.12 ▲23.99
Posts /wp-admin/edit.php2,708 ▲22.68 ▼0.0064.46 ▼8.4092.21 ▼22.86
Add New Post /wp-admin/post-new.php1,658 ▲718.74 ▲1.69348.00 ▲5.09106.37 ▼6.25
Media Library /wp-admin/upload.php1,777 ▲25.01 ▲0.00143.30 ▼7.89116.10 ▲2.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: bank gateway, georgia, gateway, woocommerce, payment...

woo-tbc-payment-gateway/plugandpay-woocommerce-tbc-credit-card-payment-gateway-free.php 77% from 13 tests

The primary PHP file in "WooCommerce TBC Credit Card Payment Gateway (Free)" version 2.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-tbc-payment-gateway.php" instead of "plugandpay-woocommerce-tbc-credit-card-payment-gateway-free.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
Everything looks great! No dangerous files found in this plugin1,230 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP132327341,038
JSON30084
Markdown122053
XML1154229
SVG20116
CSS131110

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.43
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods71
▷ Static methods57.04%
▷ Public methods6692.96%
▷ Protected methods00.00%
▷ Private methods57.04%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin