84% tpro3-payment-gateway-for-woocommerce

Code Review | WooCommerce TPro3 Payment Gateway

WordPress plugin WooCommerce TPro3 Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: tpro3-payment-gat...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 2, 2015
  • Latest release: Jan 24, 2019
  • Number of updates: 45
  • Update frequency: every 26.9 days
  • Top authors: 2cpIT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,164 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
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼5.46ms] Passed 4 tests

A check of server-side resources used by WooCommerce TPro3 Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2438.60 ▼5.08
Dashboard /wp-admin3.53 ▲0.2246.82 ▲0.61
Posts /wp-admin/edit.php3.64 ▲0.2848.78 ▼2.97
Add New Post /wp-admin/post-new.php6.11 ▲0.2288.46 ▼14.41
Media Library /wp-admin/upload.php3.45 ▲0.2236.13 ▲2.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce TPro3 Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.22 ▼1.093.85 ▲2.1137.34 ▼6.37
Dashboard /wp-admin2,209 ▲304.87 ▼1.01111.88 ▲7.9744.53 ▲0.69
Posts /wp-admin/edit.php2,095 ▲32.02 ▼0.0439.17 ▼4.2836.16 ▼1.20
Add New Post /wp-admin/post-new.php1,517 ▼1617.58 ▼5.61674.16 ▲7.1958.06 ▲0.55
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.0493.46 ▼20.8039.89 ▼9.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tpro3-payment-gateway-for-woocommerce/tpro3.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === tpro3-payment-gateway-for-woocommerce === )
You can look at the official readme.txt

tpro3-payment-gateway-for-woocommerce/tpro3.php 92% from 13 tests

The main PHP script in "WooCommerce TPro3 Payment Gateway" version 1.2.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tpro3-payment-gateway-for-woocommerce.php" instead of "tpro3.php")

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
Everything looks great! No dangerous files found in this plugin1,697 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12,1151281,514
JavaScript1195183

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity119.00
▷ Minimum class complexity119.00
▷ Maximum class complexity119.00
Average method complexity10.08
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin