84% woofunnels-woocommerce-nmi-gateway

Code Review | XL NMI Gateway for WooCommerce

WordPress plugin XL NMI Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woofunnels-woocom...
  • Plugin version: 2.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2018
  • Latest release: Sep 25, 2023
  • Number of updates: 77
  • Update frequency: every 23.5 days
  • Top authors: dineshinau (77.92%)teamwoofunnels (19.48%)xlplugins (5.19%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /15,289 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.03ms] Passed 4 tests

This is a short check of server-side resources used by XL NMI Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.57 ▼6.32
Dashboard /wp-admin3.34 ▲0.0444.11 ▼4.33
Posts /wp-admin/edit.php3.46 ▲0.1049.18 ▲2.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0495.57 ▼0.80
Media Library /wp-admin/upload.php3.27 ▲0.0434.41 ▼0.65

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

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

Browser metrics Passed 4 tests

XL NMI Gateway for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.61 ▼0.751.89 ▼0.1440.62 ▼3.34
Dashboard /wp-admin2,203 ▲115.78 ▲0.7496.18 ▼19.8141.40 ▼1.10
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0039.34 ▲3.0737.21 ▲4.65
Add New Post /wp-admin/post-new.php1,536 ▲2223.15 ▲5.57611.28 ▼66.5653.25 ▲2.04
Media Library /wp-admin/upload.php1,391 ▲34.24 ▲0.0998.88 ▲2.6043.48 ▼3.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: notifications_list in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/views/woofunnels-notifications.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/as-data-store/asct/class-bwf-as-action-store.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BWF_Plugin_Compatibilities' not found in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/compatibilities/class-bwf-compatibility-with-aelia-cs.php:84
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/lib/skyverge/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/as-data-store/class-woofunnels-as-ds.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/lib/skyverge/woocommerce/payment-gateway/admin/views/html-admin-gateway-status.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WFCO_Model' not found in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/connector/db/class-wfco-model-connectormeta.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/includes/class-bwf-data-tags.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/as-data-store/asct/class-bwf-as-cli.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woofunnels-woocommerce-nmi-gateway/woofunnels/includes/class-bwf-ecomm-tracking-common.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
Please fix the following attributes: The official readme.txt might help

woofunnels-woocommerce-nmi-gateway/woofunnels-woocommerce-nmi-gateway.php 92% from 13 tests

"XL NMI Gateway for WooCommerce" version 2.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 200 characters long)

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
Good job! No executable or dangerous file extensions detected40,208 lines of code in 252 files:
LanguageFilesBlank linesComment linesLines of code
PHP18211,01619,18429,459
JavaScript176461584,659
CSS12444293,068
JSON3101,911
CoffeeScript6464313633
Sass58526392
SVG260351
XML14035

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity28.64
▷ Minimum class complexity1.00
▷ Maximum class complexity279.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity81.00
Code structure
Namespaces3
Interfaces13
Traits0
Classes144
▷ Abstract classes2517.36%
▷ Concrete classes11982.64%
▷ Final classes10.84%
Methods2,162
▷ Static methods37917.53%
▷ Public methods1,72479.74%
▷ Protected methods40618.78%
▷ Private methods321.48%
Functions60
▷ Named functions3558.33%
▷ Anonymous functions2541.67%
Constants86
▷ Global constants1517.44%
▷ Class constants7182.56%
▷ Public constants71100.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
31 compressed PNG files occupy 0.41MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/skyverge/woocommerce/payment-gateway/assets/images/card-cartebleue.png0.35KB0.38KB0.00%
lib/skyverge/woocommerce/payment-gateway/assets/images/card-laser.png1.05KB1.19KB0.00%
lib/skyverge/woocommerce/payment-gateway/assets/images/card-visa-electron.png0.94KB1.00KB0.00%
lib/skyverge/woocommerce/payment-gateway/assets/images/card-echeck.png1.09KB1.15KB0.00%
admin/assets/img/nextmove.png5.32KB2.53KB▼ 52.45%