84% tpro2-payment-gateway-for-woocommerce

Code Review | WooCommerce TPro2 Payment Gateway

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

About plugin

  • Plugin page: tpro2-payment-gat...
  • Plugin version: 3.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jun 14, 2016
  • Latest release: Jul 22, 2016
  • Number of updates: 40
  • Update frequency: every 0.9 days
  • Top authors: 2cpIT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /779 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by WooCommerce TPro2 Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.94 ▼3.74
Dashboard /wp-admin3.31 ▲0.0044.84 ▼4.24
Posts /wp-admin/edit.php3.36 ▲0.0046.51 ▲5.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.35 ▼0.26
Media Library /wp-admin/upload.php3.23 ▲0.0038.01 ▲5.62

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce TPro2 Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.63 ▼1.134.10 ▲2.1539.53 ▼2.13
Dashboard /wp-admin2,206 ▲185.88 ▼0.01106.17 ▲1.2340.59 ▼1.69
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0438.94 ▲5.4538.32 ▲3.09
Add New Post /wp-admin/post-new.php1,534 ▲123.54 ▲0.24664.18 ▲9.5054.03 ▼4.78
Media Library /wp-admin/upload.php1,388 ▼04.17 ▲0.0498.77 ▲3.0642.29 ▼0.30

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === tpro2-payment-gateway-for-woocommerce === )
You can look at the official readme.txt

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

The principal PHP file in "WooCommerce TPro2 Payment Gateway" v. 3.0.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tpro2-payment-gateway-for-woocommerce.php" instead of "tpro2.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 plugin327 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13913327

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin