88% invoice-system-for-woocommerce

Code Review | Invoice System for WooCommerce- Automate & Manage PDF Invoices, Packing Slips, Shipping Labels and Delivery Notes

WordPress plugin Invoice System for WooCommerce- Automate & Manage PDF Invoices, Packing Slips, Shipping Labels and Delivery Notes scored 88% from 54 tests.

About plugin

  • Plugin page: invoice-system-fo...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.2
  • WordPress version: 5.8.1
  • First release: Mar 26, 2021
  • Latest release: Nov 19, 2021
  • Number of updates: 11
  • Update frequency: every 21.7 days
  • Top authors: makewebbetter (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 980 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼169.51ms] Passed 4 tests

A check of server-side resources used by Invoice System for WooCommerce- Automate & Manage PDF Invoices, Packing Slips, Shipping Labels and Delivery Notes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.83 ▲10.29
Dashboard /wp-admin3.06 ▲0.0044.76 ▲0.55
Posts /wp-admin/edit.php3.11 ▲0.0045.14 ▲4.49
Add New Post /wp-admin/post-new.php5.42 ▼0.0287.06 ▼683.73
Media Library /wp-admin/upload.php3.01 ▲0.0032.37 ▲0.66

Server storage [IO: ▲22.55MB] [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: 576 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Invoice System for WooCommerce- Automate & Manage PDF Invoices, Packing Slips, Shipping Labels and Delivery Notes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.87 ▲0.289.76 ▼1.8246.73 ▼1.24
Dashboard /wp-admin2,970 ▲395.91 ▼0.08139.26 ▼3.02114.72 ▼2.36
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0163.79 ▼1.2289.85 ▼5.42
Add New Post /wp-admin/post-new.php1,500 ▼9118.48 ▼0.33364.92 ▼28.04107.04 ▼1.11
Media Library /wp-admin/upload.php1,807 ▼35.06 ▲0.04160.20 ▲18.21115.23 ▲1.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/sabberworm/php-css-parser/tests/quickdump.php
    • > /wp-content/plugins/invoice-system-for-woocommerce/public/partials/invoice-system-for-woocommerce-public-display.php
  • 185× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/RuleSet/RuleSet.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/Value.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/src/FrameReflower/Table.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\Block' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/Renderer/TableCell.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/Positioner/TableRow.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/phenx/php-font-lib/src/FontLib/Table/DirectoryEntry.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/Adapter/PDFLib.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/FrameDecorator/Image.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/invoice-system-for-woocommerce/package/lib/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/Shape.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
8 plugin tags: woo invoices, packing slips, invoice, invoices, print invoice...

invoice-system-for-woocommerce/invoice-system-for-woocommerce.php Passed 13 tests

The main PHP script in "Invoice System for WooCommerce- Automate & Manage PDF Invoices, Packing Slips, Shipping Labels and Delivery Notes" version 1.0.5 is automatically included on every request by WordPress
128 characters long description:
Generate Invoices and packing slips automatically and sent them to your customers via email with Invoice System for WooCommerce.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin72,317 lines of code in 340 files:
LanguageFilesBlank linesComment linesLines of code
PHP23810,00818,61566,320
CSS564961222,815
JavaScript131672441,074
Markdown62650947
PO File1204331485
JSON600378
XML632200
YAML312264
HTML10017
SVG100017

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity43.60
▷ Minimum class complexity1.00
▷ Maximum class complexity797.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces35
Interfaces6
Traits0
Classes272
▷ Abstract classes165.88%
▷ Concrete classes25694.12%
▷ Final classes00.00%
Methods3,321
▷ Static methods1785.36%
▷ Public methods2,83585.37%
▷ Protected methods35610.72%
▷ Private methods1303.91%
Functions47
▷ Named functions1940.43%
▷ Anonymous functions2859.57%
Constants277
▷ Global constants51.81%
▷ Class constants27298.19%
▷ Public constants272100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
27 compressed PNG files occupy 0.51MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/image/mwb-logo.png0.25KB0.26KB0.00%
admin/image/invoice_customizable_icon.png3.59KB3.59KB0.00%
admin/image/email-icon.png2.01KB2.03KB0.00%
package/lib/colorpicker-js/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
package/lib/dompdf/vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%