48% print-invoices-packing-slip-labels-for-woocommerce

Code Review | WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels

WordPress plugin WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels scored48%from 54 tests.

About plugin

  • Plugin page: print-invoices-pa...
  • Plugin version: 4.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Jun 15, 2016
  • Latest release: Nov 20, 2023
  • Number of updates: 189
  • Update frequency: every 14.4 days
  • Top authors: webtoffee (57.14%)WooForce (17.99%)mujeebur (14.29%)xadapter (12.17%)

Code review

54 tests

User reviews

186 reviews

Install metrics

50,000+ active /1,193,792 total downloads

Benchmarks

Plugin footprint 30% 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.13MB] [CPU: ▼0.90ms] Passed 4 tests

Server-side resources used by WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1437.72 ▼2.29
Dashboard /wp-admin3.44 ▲0.1349.59 ▲0.12
Posts /wp-admin/edit.php3.55 ▲0.1949.81 ▲0.53
Add New Post /wp-admin/post-new.php6.02 ▲0.1382.02 ▼1.96
Media Library /wp-admin/upload.php3.36 ▲0.1340.51 ▲8.12

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 665 new files
Database: 1 new table, 19 new options
New tables
wp_wfpklist_template_data
New WordPress options
widget_recent-comments
wt_pklist_common_modules
theysaidso_admin_options
wf_woocommerce_packing_list_shippinglabel
Wf_Woocommerce_Packing_List
widget_recent-posts
wf_woocommerce_packing_list_invoice
wf_woocommerce_packing_list_packinglist
wf_pklist_module_status_migrated
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3914.15 ▼0.211.51 ▼0.2436.61 ▼9.01
Dashboard /wp-admin2,206 ▲265.62 ▲0.0994.54 ▲5.9839.73 ▲1.45
Posts /wp-admin/edit.php2,115 ▲151.98 ▼0.0439.91 ▼0.8538.69 ▲2.30
Add New Post /wp-admin/post-new.php1,537 ▲1123.33 ▼0.05657.61 ▲35.2062.59 ▲5.25
Media Library /wp-admin/upload.php1,414 ▲114.29 ▲0.08109.08 ▲10.8348.24 ▲4.05

Uninstaller [IO: ▲18.52MB] [DB: ▲0.01MB] 0% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Error in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/class-wf-woocommerce-packing-list-deactivator.php+37
    Uncaught Error: Call to undefined function as_unschedule_all_actions() in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/class-wf-woocommerce-packing-list-deactivator.php:37
    Stack trace:
    #0 wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/print-invoices-packing-slip-labels-for-woocommerce.php(100): Wf_Woocommerce_Packing_List_Deactivator::deactivate()
    #1 wp-includes/class-wp-hook.php(310): deactivate_wf_woocommerce_packing_list()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(816): do_action()
  • Uninstaller has failed for this plugin, leaving 665 files (18.52MB) in the plugin directory
    • (new file) admin/data/data.filters-help.php
    • (new file) admin/data/data.language-list.php
    • (new file) admin/css/wf-woocommerce-packing-list-admin.css
    • (new file) admin/class-wf-woocommerce-packing-list-admin.php
    • (new file) admin/css/wf-woocommerce-packing-list-admin-addons-page.css
    • (new file) admin/data/data.tooltip.php
    • (new file) admin/images/banner/webtoffee_logo.svg
    • (new file) admin/class-wt-promotion-banner.php
    • (new file) admin/images/addresslabel_logo.png
    • (new file) admin/images/addresslabel.png
    • ...
  • Zombie tables detected upon uninstall: 1 table
    • wp_wfpklist_template_data
  • This plugin does not fully uninstall, leaving 20 options in the database
    • wt_pklist_new_install
    • wf_woocommerce_packing_list_dispatchlabel
    • wf_pklist_options_migrated
    • wf_pklist_templates_migrated
    • wf_woocommerce_packing_list_packinglist
    • wf_woocommerce_packing_list_shippinglabel
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 items
  • 11× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/admin/modules/migrator/data/data.invoice.migrator.template.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/invoice/data/data.template2.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/invoice/data/data.template0.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/invoice/data/data.template1.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/invoice/data/data.template3.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/shippinglabel/data/data.template1.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/partials/wf-woocommerce-packing-list-public-display.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/deliverynote/data/data.template1.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/dispatchlabel/data/data.template1.php
    • > /wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/masterminds/html5/bin/entities.php
  • 151× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Table.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\AbstractRenderer' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/Renderer/Text.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/phenx/php-font-lib/src/FontLib/Header.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\AbstractRenderer' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/Renderer/ListBullet.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Glyph\\Outline' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineSimple.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameDecorator/Image.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/phenx/php-svg-lib/src/Svg/Tag/Rect.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/invoice/data/data.tooltip.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/sabberworm/php-css-parser/src/Comment/Comment.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

print-invoices-packing-slip-labels-for-woocommerce/print-invoices-packing-slip-labels-for-woocommerce.php 92% from 13 tests

The main PHP script in "WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels" version 4.2.1 is automatically included on every request by WordPress
The following require your attention:
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 75 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin157,026 lines of code in 400 files:
LanguageFilesBlank linesComment linesLines of code
PHP33010,62919,80091,067
PO File1616,78629,23037,427
JSON130022,802
JavaScript11210903,556
Markdown1339801,333
CSS411558655
SVG1000106
YAML19035
XML10028
HTML10017

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.42
Average class complexity38.55
▷ Minimum class complexity1.00
▷ Maximum class complexity811.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces39
Interfaces9
Traits0
Classes234
▷ Abstract classes135.56%
▷ Concrete classes22194.44%
▷ Final classes20.90%
Methods2,769
▷ Static methods37613.58%
▷ Public methods2,21079.81%
▷ Protected methods44416.03%
▷ Private methods1154.15%
Functions150
▷ Named functions12080.00%
▷ Anonymous functions3020.00%
Constants277
▷ Global constants2810.11%
▷ Class constants24989.89%
▷ Public constants24397.59%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
116 PNG files occupy 1.55MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/wt_adc_logo.png3.17KB2.20KB▼ 30.54%
admin/images/other_solutions/wt_pi_logo.png4.67KB2.66KB▼ 43.01%
assets/images/shippinglabel.png0.60KB0.62KB0.00%
admin/images/packinglist_logo.png1.83KB1.16KB▼ 36.82%
admin/images/other_solutions/WordPress-backup-and-migration-plugin.png19.77KB19.77KB0.01%