89% tpay-ge-woocommerce

Code Review | TBC E-commerce for WooCommerce

WordPress plugin TBC E-commerce for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: tpay-ge-woocommerce
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7
  • WordPress version: 6.3.1
  • First release: Jan 22, 2019
  • Latest release: Apr 7, 2022
  • Number of updates: 13
  • Update frequency: every 90.3 days
  • Top authors: sandrodz (92.31%)tpay (15.38%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,843 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.79ms] Passed 4 tests

A check of server-side resources used by TBC E-commerce for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.85 ▼4.37
Dashboard /wp-admin3.40 ▲0.1049.37 ▼7.31
Posts /wp-admin/edit.php3.51 ▲0.1647.80 ▼3.77
Add New Post /wp-admin/post-new.php5.98 ▲0.1097.19 ▲2.56
Media Library /wp-admin/upload.php3.32 ▲0.0937.34 ▲0.28

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TBC E-commerce for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.25 ▼1.504.51 ▲2.6242.02 ▲0.14
Dashboard /wp-admin2,221 ▲185.82 ▼0.04100.48 ▼20.4340.65 ▼2.84
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0135.47 ▼1.0334.39 ▲0.35
Add New Post /wp-admin/post-new.php1,558 ▲1218.20 ▼4.97606.37 ▼62.6961.73 ▲3.51
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.05100.79 ▼0.2045.70 ▲0.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: payment gateway, tbc

tpay-ge-woocommerce/tpay-for-woocommerce.php 77% from 13 tests

This is the main PHP file of "TBC E-commerce for WooCommerce" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tpay-ge-woocommerce.php" instead of "tpay-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,155 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP132716231,107
XML1154229
JSON20019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.71
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods64
▷ Static methods57.81%
▷ Public methods6398.44%
▷ Protected methods00.00%
▷ Private methods11.56%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Cards.png1.61KB1.52KB▼ 5.41%
assets/ApplePay.png0.82KB1.19KB0.00%
assets/TBC.png0.70KB0.85KB0.00%
assets/QR.png2.95KB1.52KB▼ 48.31%
assets/Ertguli.png1.05KB1.02KB▼ 2.51%