89% high-risk-payments-for-woo

Code Review | High Risk Payment Gateway for WooCommerce

WordPress plugin High Risk Payment Gateway for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: high-risk-payment...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Sep 7, 2023
  • Number of updates: 33
  • Update frequency: every 86.3 days
  • Top authors: cardpaysolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 6,789 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.05MB] [CPU: ▲4.80ms] Passed 4 tests

Server-side resources used by High Risk Payment Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0654.22 ▲11.43
Dashboard /wp-admin3.36 ▲0.0556.19 ▲12.03
Posts /wp-admin/edit.php3.41 ▲0.0547.40 ▲4.87
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.76 ▼1.77
Media Library /wp-admin/upload.php3.28 ▲0.0534.95 ▲4.68

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

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

Browser metrics Passed 4 tests

A check of browser resources used by High Risk Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.40 ▼0.974.41 ▲2.6540.77 ▲2.42
Dashboard /wp-admin2,206 ▲185.79 ▲0.70113.85 ▼1.6045.84 ▼2.07
Posts /wp-admin/edit.php2,089 ▼32.00 ▲0.0148.77 ▲7.7071.68 ▲33.36
Add New Post /wp-admin/post-new.php1,534 ▲1423.08 ▲0.15755.83 ▲148.4966.27 ▲17.69
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.11122.10 ▲13.9651.66 ▲5.50

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 86% 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
9 plugin tags: woocommerc pre order payment, high risk, firearms, woocommerce subscription payment, tech support...

high-risk-payments-for-woo/woocommerce-cardpay-solutions.php 69% from 13 tests

"High Risk Payment Gateway for WooCommerce" version 2.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("high-risk-payments-for-woo.php" instead of "woocommerce-cardpay-solutions.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "2.2.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,414 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP102748462,216
JavaScript2110155
CSS10043

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.25
▷ Minimum class complexity18.00
▷ Maximum class complexity58.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods96
▷ Static methods11.04%
▷ Public methods8285.42%
▷ Protected methods1010.42%
▷ Private methods44.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/cardpay_logo_sm.png12.09KB4.42KB▼ 63.45%