78% woocommerce-delivery-notes

Code Review | Print Invoice & Delivery Notes for WooCommerce

WordPress plugin Print Invoice & Delivery Notes for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-deliv...
  • Plugin version: 4.8.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2011
  • Latest release: Oct 10, 2023
  • Number of updates: 207
  • Update frequency: every 20.8 days
  • Top authors: chabis (55.56%)tychesoftwares (24.64%)ashokrane (12.08%)daveshine (9.18%)

Code review

54 tests

User reviews

102 reviews

Install metrics

40,000+ active /955,005 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.51ms] Passed 4 tests

A check of server-side resources used by Print Invoice & Delivery Notes for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.35 ▼5.57
Dashboard /wp-admin3.36 ▲0.0547.89 ▼4.13
Posts /wp-admin/edit.php3.47 ▲0.1145.89 ▼1.71
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.77 ▼6.61
Media Library /wp-admin/upload.php3.28 ▲0.0536.36 ▲0.48

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Print Invoice & Delivery Notes for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.59 ▲0.191.74 ▼0.2543.46 ▼0.97
Dashboard /wp-admin2,198 ▲185.66 ▲0.0481.49 ▼21.5437.86 ▼5.86
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0035.01 ▼1.3133.15 ▲0.61
Add New Post /wp-admin/post-new.php1,535 ▲918.09 ▼5.52589.06 ▼113.1566.04 ▲9.93
Media Library /wp-admin/upload.php1,400 ▲64.16 ▼0.0395.09 ▼3.9642.79 ▼4.47

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php
  • 61× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 96
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 96
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 64
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 101
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 94
    • > PHP Notice
      Undefined variable: ts_plugin_name in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 58
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 76
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 94
    • > PHP Notice
      Undefined variable: ts_faq in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 96
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-delivery-notes/includes/component/faq-support/templates/faq-page/faq-page.php on line 89

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

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The clean invoice print view.), #2 (Print panel.), #3 (Quick print actions.), #4 (Bulk print orders.), #5 (Enter company and contact information.), #6 (Customers can also print the order.), #7 (The clean Delivery note view.)
The official readme.txt is a good inspiration

woocommerce-delivery-notes/woocommerce-delivery-notes.php 92% from 13 tests

The entry point to "Print Invoice & Delivery Notes for WooCommerce" version 4.8.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin11,013 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PO File183,3315,9047,187
PHP217451,3203,267
CSS28822397
JavaScript44474134
SVG10015
Markdown211013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity23.73
▷ Minimum class complexity4.00
▷ Maximum class complexity60.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods118
▷ Static methods3731.36%
▷ Public methods10689.83%
▷ Protected methods00.00%
▷ Private methods1210.17%
Functions38
▷ Named functions3797.37%
▷ Anonymous functions12.63%
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
11 PNG files occupy 0.60MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png7.69KB5.40KB▼ 29.74%
assets/images/wcdn-invoice-numbering.png22.24KB6.71KB▼ 69.82%
screenshot-4.png14.00KB8.67KB▼ 38.04%
screenshot-1.png66.09KB37.82KB▼ 42.77%
assets/images/icon-256x256.png104.10KB22.45KB▼ 78.43%