89% wp-nmi-gateway-pci-woocommerce

Code Review | WP NMI Gateway PCI for WooCommerce

WordPress plugin WP NMI Gateway PCI for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wp-nmi-gateway-pc...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Apr 24, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 19
  • Update frequency: every 69.3 days
  • Top authors: mohsinoffline (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /17,794 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.06MB] [CPU: ▼6.02ms] Passed 4 tests

Server-side resources used by WP NMI Gateway PCI for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.87 ▼6.57
Dashboard /wp-admin3.37 ▲0.0645.62 ▼1.75
Posts /wp-admin/edit.php3.48 ▲0.1245.61 ▲0.71
Add New Post /wp-admin/post-new.php5.95 ▲0.0678.04 ▼16.45
Media Library /wp-admin/upload.php3.29 ▲0.0633.78 ▲0.98

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 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

This is an overview of browser requirements for WP NMI Gateway PCI for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.18 ▼0.531.69 ▲0.0237.46 ▼9.15
Dashboard /wp-admin2,198 ▲185.60 ▼0.0693.40 ▼7.4745.73 ▲5.01
Posts /wp-admin/edit.php2,106 ▲61.97 ▼0.1039.98 ▲0.5737.51 ▼2.69
Add New Post /wp-admin/post-new.php1,529 ▲323.66 ▲0.59598.89 ▼111.0549.66 ▼8.79
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.0097.55 ▲0.5944.66 ▲3.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: pci, recurring payments, tokenization, pci-dss, woocommerce subscriptions...

wp-nmi-gateway-pci-woocommerce/gateway.php 69% from 13 tests

The main PHP script in "WP NMI Gateway PCI for WooCommerce" version 1.1.6 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 202 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-nmi-gateway-pci-woocommerce.php" instead of "gateway.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "3.3")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,185 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6235247961
JavaScript14428224

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity29.00
▷ Minimum class complexity3.00
▷ Maximum class complexity89.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods46
▷ Static methods613.04%
▷ Public methods4393.48%
▷ Protected methods24.35%
▷ Private methods12.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin