84% wc-invoice-gateway

Code Review | WooCommerce Invoice Gateway

WordPress plugin WooCommerce Invoice Gateway scored84%from 54 tests.

About plugin

  • Plugin page: wc-invoice-gateway
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 11, 2016
  • Latest release: Aug 31, 2023
  • Number of updates: 34
  • Update frequency: every 74.0 days
  • Top authors: stuartduff (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /25,040 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.70ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Invoice Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.41 ▼2.37
Dashboard /wp-admin3.33 ▼0.0148.73 ▼14.11
Posts /wp-admin/edit.php3.38 ▲0.0343.69 ▼1.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.65 ▼28.50
Media Library /wp-admin/upload.php3.25 ▲0.0334.84 ▲0.50

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Invoice Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.36 ▼0.261.66 ▼0.0243.69 ▼0.83
Dashboard /wp-admin2,210 ▲335.63 ▲0.0193.74 ▲3.6942.01 ▲5.31
Posts /wp-admin/edit.php2,115 ▲152.00 ▼0.0233.92 ▼3.9133.48 ▼4.58
Add New Post /wp-admin/post-new.php1,538 ▲1223.27 ▲0.31686.27 ▲83.5266.42 ▲14.59
Media Library /wp-admin/upload.php1,415 ▲214.25 ▲0.03103.87 ▲7.8948.64 ▲7.11

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

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

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 | 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/wc-invoice-gateway/includes/blocks/class-wc-invoice-payments-blocks.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
10 plugin tags: checkout, sales, payments, e-commerce, cart...

wc-invoice-gateway/wc-invoice-gateway.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Invoice Gateway" version 2.0.1
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 211 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("6.0" instead of "6.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin409 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5123273408
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.33
▷ Minimum class complexity5.00
▷ Maximum class complexity46.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods35
▷ Static methods1234.29%
▷ Public methods2365.71%
▷ Protected methods38.57%
▷ Private methods925.71%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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