84% certegy-ezipay-payment-gateway

Code Review | Certegy EziPay Payment Gateway for WooCommerce

WordPress plugin Certegy EziPay Payment Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: certegy-ezipay-pa...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2017
  • Latest release: Jan 29, 2018
  • Number of updates: 13
  • Update frequency: every 9.5 days
  • Top authors: certegy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /649 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Certegy EziPay Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.03 ▼8.27
Dashboard /wp-admin3.31 ▼0.0347.14 ▼31.21
Posts /wp-admin/edit.php3.36 ▲0.0150.69 ▼12.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.91 ▼43.78
Media Library /wp-admin/upload.php3.23 ▲0.0141.64 ▲4.81

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Certegy EziPay Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.18 ▼1.201.91 ▼0.3141.42 ▼13.00
Dashboard /wp-admin2,218 ▲215.80 ▲0.8899.27 ▼28.2737.81 ▼13.19
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0039.88 ▼6.9534.10 ▼9.80
Add New Post /wp-admin/post-new.php1,549 ▲1723.30 ▲0.32692.02 ▲34.1357.70 ▲3.54
Media Library /wp-admin/upload.php1,403 ▲94.23 ▲0.00110.14 ▲1.3647.03 ▲1.02

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/certegy-ezipay-payment-gateway/WC_Flexi_Gateway.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/certegy-ezipay-payment-gateway/WC_Flexi_Gateway.php:2

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

certegy-ezipay-payment-gateway/ezipay.php 92% from 13 tests

The entry point to "Certegy EziPay Payment Gateway for WooCommerce" version 1.3.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("certegy-ezipay-payment-gateway.php" instead of "ezipay.php")

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
Success! There were no dangerous files found in this plugin2,554 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72721431,328
PHP4117201620
SVG1240385
CSS2220221

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity26.33
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods2357.50%
▷ Protected methods410.00%
▷ Private methods1332.50%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.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
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
images/ezipay.png8.51KB3.12KB▼ 63.30%