84% woocom-securepay-payment-gateway

Code Review | WooCom SecurePay Payment Gateway

WordPress plugin WooCom SecurePay Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocom-securepay-...
  • Plugin version: 1.8
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2016
  • Latest release: Aug 25, 2023
  • Number of updates: 32
  • Update frequency: every 77.3 days
  • Top authors: hemthapa (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /17,296 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.01MB] [CPU: ▼7.49ms] Passed 4 tests

This is a short check of server-side resources used by WooCom SecurePay Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.56 ▼1.30
Dashboard /wp-admin3.31 ▼0.0445.37 ▼15.75
Posts /wp-admin/edit.php3.36 ▲0.0049.70 ▲0.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.29 ▼12.83
Media Library /wp-admin/upload.php3.23 ▲0.0031.90 ▼0.06

Server storage [IO: ▲0.03MB] [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
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCom SecurePay Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.18 ▼1.474.50 ▲2.6640.70 ▼3.01
Dashboard /wp-admin2,203 ▲155.88 ▲0.78112.68 ▼2.5339.32 ▼7.67
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0441.29 ▲7.0035.54 ▼2.15
Add New Post /wp-admin/post-new.php1,519 ▼023.07 ▼0.17682.04 ▲66.0753.27 ▲2.52
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0295.60 ▼4.1941.77 ▼2.07

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocom-securepay-payment-gateway/woocom_securepay_payment_gateway.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% 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
7 plugin tags: woocommerce, checkout, woocommerce securepay, gateway, securepay payment...

woocom-securepay-payment-gateway/woocom_securepay_payment_gateway.php 92% from 13 tests

The entry point to "WooCom SecurePay Payment Gateway" version 1.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocom-securepay-payment-gateway.php" instead of "woocom_securepay_payment_gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin260 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16015252
CSS1138

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
securepay_logo.png10.04KB4.56KB▼ 54.61%