84% quadpay-gateway-for-woocommerce

Code Review | Zip North America Gateway for WooCommerce

WordPress plugin Zip North America Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: quadpay-gateway-f...
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0+
  • WordPress version: 6.3.1
  • First release: Jul 28, 2020
  • Latest release: Jun 29, 2023
  • Number of updates: 26
  • Update frequency: every 41.0 days
  • Top authors: quadpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /8,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.93ms] Passed 4 tests

A check of server-side resources used by Zip North America Gateway for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1649.16 ▲9.06
Dashboard /wp-admin3.52 ▲0.2273.68 ▲23.99
Posts /wp-admin/edit.php3.56 ▲0.2045.91 ▲1.10
Add New Post /wp-admin/post-new.php6.03 ▲0.1478.81 ▼15.40
Media Library /wp-admin/upload.php3.37 ▲0.1434.59 ▲1.51

Server storage [IO: ▲0.11MB] [DB: ▲0.27MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Zip North America Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.201.58 ▼0.2839.81 ▼5.89
Dashboard /wp-admin2,203 ▲514.86 ▼0.7697.37 ▲0.5037.33 ▼3.30
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1033.79 ▼3.0034.64 ▼0.92
Add New Post /wp-admin/post-new.php1,547 ▲3318.61 ▲1.05641.06 ▼25.5471.39 ▲15.46
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.0397.03 ▼5.3443.60 ▼3.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.26MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/quadpay-gateway-for-woocommerce/includes/class-quadpay-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/quadpay-gateway-for-woocommerce/quadpay.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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 need to be fixed:
  • Contributors: Contributors not specified
The official readme.txt might help

quadpay-gateway-for-woocommerce/quadpay.php 92% from 13 tests

Analyzing the main PHP file in "Zip North America Gateway for WooCommerce" version 1.7.3
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("quadpay-gateway-for-woocommerce.php" instead of "quadpay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,279 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP83523861,249
JavaScript22217
SVG50013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.43
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods58
▷ Static methods712.07%
▷ Public methods5594.83%
▷ Protected methods00.00%
▷ Private methods35.17%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants220.00%
▷ Class constants880.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin