84% woocommerce-paygatenet-payment-gateway

Code Review | WooCommerce PayGate.net Payment Gateway

WordPress plugin WooCommerce PayGate.net Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-payga...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 6, 2014
  • Latest release: Jul 6, 2014
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: Henry Krupp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,314 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.73ms] Passed 4 tests

An overview of server-side resources used by WooCommerce PayGate.net Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.85 ▼0.82
Dashboard /wp-admin3.45 ▲0.1552.13 ▼0.62
Posts /wp-admin/edit.php3.57 ▲0.2147.96 ▼4.08
Add New Post /wp-admin/post-new.php6.03 ▲0.1588.46 ▼5.41
Media Library /wp-admin/upload.php3.38 ▲0.1537.26 ▲4.74

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce PayGate.net Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.85 ▼0.0943.19 ▼1.49
Dashboard /wp-admin2,198 ▲185.63 ▼0.0388.22 ▼11.0941.07 ▼4.88
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0234.02 ▼2.6035.66 ▲0.95
Add New Post /wp-admin/post-new.php1,534 ▲618.13 ▼4.85643.75 ▼46.7658.50 ▲4.56
Media Library /wp-admin/upload.php1,403 ▲34.25 ▲0.0799.95 ▼5.1240.24 ▼8.16

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woocommerce-paygatenet-payment-gateway/paygate_gateway.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: Please take inspiration from this readme.txt

woocommerce-paygatenet-payment-gateway/paygate_gateway.php 92% from 13 tests

The entry point to "WooCommerce PayGate.net Payment Gateway" version 1.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-paygatenet-payment-gateway.php" instead of "paygate_gateway.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
There were no executable files found in this plugin1,080 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141190683
PO File166131157
JavaScript22047128
CSS2170112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/PayGate.png4.12KB2.35KB▼ 42.87%
images/cc.png6.83KB3.07KB▼ 55.04%
images/kr.png0.34KB0.34KB0.29%