73% inovio-payment-gateway

Code Review | Inovio Payment Gateway WooCommerce Plugin

WordPress plugin Inovio Payment Gateway WooCommerce Plugin scored 73% from 54 tests.

About plugin

  • Plugin page: inovio-payment-ga...
  • Plugin version: 4.4.23
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Jul 11, 2020
  • Latest release: Aug 17, 2020
  • Number of updates: 8
  • Update frequency: every 4.8 days
  • Top authors: inoviopay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 484 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.10ms] Passed 4 tests

This is a short check of server-side resources used by Inovio Payment Gateway WooCommerce Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.95 ▼4.32
Dashboard /wp-admin3.31 ▲0.0144.65 ▼1.93
Posts /wp-admin/edit.php3.36 ▲0.0145.27 ▲0.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.65 ▲4.02
Media Library /wp-admin/upload.php3.24 ▲0.0130.77 ▼2.22

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Inovio Payment Gateway WooCommerce Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.84 ▲0.601.65 ▼0.3039.59 ▼2.45
Dashboard /wp-admin2,209 ▲215.89 ▲1.01107.47 ▲0.2041.14 ▲1.26
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0338.64 ▲4.0035.30 ▲0.47
Add New Post /wp-admin/post-new.php1,533 ▲1423.13 ▼0.21594.84 ▼66.9148.49 ▼6.25
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.0594.79 ▼7.4443.18 ▼0.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_inovio_refunded
    • wp_ach_inovio_refunded
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/inovio-payment-gateway/includes/inoviopay/woocommerce-inovio-gateway.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/inovio-payment-gateway/includes/ach/methods/class-ach-inovio-method.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/inovio-payment-gateway/includes/installer/inovio-plugin-database-table.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/inovio-payment-gateway/includes/inoviopay/methods/class-inovio-direct-method.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/inovio-payment-gateway/includes/ach/class-woocommerce-ach-inovio-gateway.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
There were no plugin tags found

inovio-payment-gateway/woocommerce-inovio-gateway.php 77% from 13 tests

The main PHP script in "Inovio Payment Gateway WooCommerce Plugin" version 4.4.23 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("inovio-payment-gateway.php" instead of "woocommerce-inovio-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
Success! There were no dangerous files found in this plugin1,370 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP112585541,251
JavaScript23113106
CSS12013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.89
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods68
▷ Static methods00.00%
▷ Public methods5175.00%
▷ Protected methods11.47%
▷ Private methods1623.53%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/img/ach-check-logo.png4.81KB0.00KB▼ 100.00%
assets/img/inovio-logo.png4.69KB2.24KB▼ 52.20%
assets/img/ach-check-logo-4.png13.92KB5.54KB▼ 60.21%