Benchmarks
Plugin footprint 65% 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.39MB] [CPU: ▼7.56ms] Passed 4 tests
This is a short check of server-side resources used by WooCommerce PDF Invoice Builder, Create invoices, packing slips and more
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.84 ▲0.37 | 35.85 ▼8.56 |
Dashboard /wp-admin | 3.76 ▲0.40 | 48.00 ▼11.62 |
Posts /wp-admin/edit.php | 3.81 ▲0.45 | 49.33 ▲1.83 |
Add New Post /wp-admin/post-new.php | 6.30 ▲0.41 | 94.10 ▼11.90 |
Media Library /wp-admin/upload.php | 3.62 ▲0.38 | 38.70 ▲4.39 |
Blank page/500 error resolver /wp-admin/admin.php?page=woo-pdf-invoice-builder/woocommerce-pdf-invoice.phperrorresolver | 3.60 | 36.70 |
WC Invoice /wp-admin/admin.php?page=wc_invoice_menu | 3.61 | 35.57 |
Documentation/Help /wp-admin/admin.php?page=woo-pdf-invoice-builder/woocommerce-pdf-invoice.phpwish_list | 3.59 | 34.48 |
Manage Invoices /wp-admin/admin.php?page=woo-pdf-invoice-builder/woocommerce-pdf-invoice.phpmanage_invoices | 3.59 | 34.45 |
Server storage [IO: ▲26.26MB] [DB: ▲0.01MB] 67% from 3 tests
A short overview of filesystem and database impact
It is recommended to fix the following issues
- The filesystem usage should be lower than 25MB (currently using 26.26MB)
Filesystem: 997 new files
Database: 3 new tables, 7 new options
New tables |
---|
wp_rednao_wc_invoices_created |
wp_rednao_wc_invoices_custom_field |
wp_rednao_wc_invoice |
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
WC_PDF_INVOICE_LATEST_DB_VERSION |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for WooCommerce PDF Invoice Builder, Create invoices, packing slips and more
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,841 ▲79 | 13.88 ▼0.83 | 1.72 ▲0.07 | 37.05 ▼1.26 |
Dashboard /wp-admin | 2,243 ▲66 | 5.84 ▲0.26 | 109.50 ▲6.83 | 42.26 ▼3.51 |
Posts /wp-admin/edit.php | 2,152 ▲52 | 2.83 ▲0.88 | 46.33 ▲7.56 | 35.17 ▼0.51 |
Add New Post /wp-admin/post-new.php | 1,574 ▲48 | 23.77 ▲0.81 | 630.24 ▼33.47 | 33.05 ▼23.22 |
Media Library /wp-admin/upload.php | 1,452 ▲52 | 5.35 ▲1.16 | 103.42 ▲1.28 | 41.73 ▼2.26 |
Blank page/500 error resolver /wp-admin/admin.php?page=woo-pdf-invoice-builder/woocommerce-pdf-invoice.phperrorresolver | 1,052 | 2.51 | 37.17 | 76.51 |
WC Invoice /wp-admin/admin.php?page=wc_invoice_menu | 1,040 | 2.39 | 32.74 | 40.02 |
Documentation/Help /wp-admin/admin.php?page=woo-pdf-invoice-builder/woocommerce-pdf-invoice.phpwish_list | 833 | 2.32 | 30.99 | 26.21 |
Manage Invoices /wp-admin/admin.php?page=woo-pdf-invoice-builder/woocommerce-pdf-invoice.phpmanage_invoices | 1,042 | 8.89 | 192.81 | 38.43 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie tables were found after uninstall: 3 tables
- wp_rednao_wc_invoices_created
- wp_rednao_wc_invoices_custom_field
- wp_rednao_wc_invoice
- Zombie WordPress options were found after uninstall: 7 options
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- WC_PDF_INVOICE_LATEST_DB_VERSION
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
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 items
- 6× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/woo-pdf-invoice-builder/pages/custom_field_list.php
- > /wp-content/plugins/woo-pdf-invoice-builder/test2.php
- > /wp-content/plugins/woo-pdf-invoice-builder/pages/documentation.php
- > /wp-content/plugins/woo-pdf-invoice-builder/vendor/phpqrcode/index.php
- > /wp-content/plugins/woo-pdf-invoice-builder/pages/invoice_list.php
- > /wp-content/plugins/woo-pdf-invoice-builder/vendor/sabberworm/php-css-parser/tests/quickdump.php
- 355× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'rnwcinv\\htmlgenerator\\fields\\subfields\\PDFSubFieldBase' not found in wp-content/plugins/woo-pdf-invoice-builder/htmlgenerator/fields/subfields/BillingSubFields/PDFBillingAddress.php:5
- > PHP Fatal error
Uncaught Error: Class 'PrintNode\\Entity' not found in wp-content/plugins/woo-pdf-invoice-builder/vendor/printnode/printnode-php/src/PrintNode/ApiKey.php:12
- > PHP Fatal error
Uncaught Error: Class 'PDFConverterBase' not found in wp-content/plugins/woo-pdf-invoice-builder/smarty/converter/PDFPaymentMethodConverter.php:2
- > PHP Fatal error
Uncaught Error: Interface 'Svg\\Surface\\SurfaceInterface' not found in wp-content/plugins/woo-pdf-invoice-builder/vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php:14
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Glyph\\Outline' not found in wp-content/plugins/woo-pdf-invoice-builder/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineSimple.php:17
- > PHP Fatal error
Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/woo-pdf-invoice-builder/vendor/smarty/sysplugins/smarty_internal_compile_call.php:17
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Table\\DirectoryEntry' not found in wp-content/plugins/woo-pdf-invoice-builder/vendor/phenx/php-font-lib/src/FontLib/TrueType/TableDirectoryEntry.php:18
- > PHP Fatal error
Uncaught Error: Class 'rnwcinv\\htmlgenerator\\fields\\subfields\\PDFSubFieldBase' not found in wp-content/plugins/woo-pdf-invoice-builder/htmlgenerator/fields/subfields/PDFInvDate.php:5
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\Block' not found in wp-content/plugins/woo-pdf-invoice-builder/vendor/dompdf/dompdf/src/FrameReflower/TableCell.php:18
- > PHP Fatal error
Uncaught Error: Class 'rnwcinv\\htmlgenerator\\fields\\PDFTable' not found in wp-content/plugins/woo-pdf-invoice-builder/htmlgenerator/fields/test/TestPDFTable.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: pdf, invoices, woocommerce pdf invoice, woocommerce invoice, woocommerce
woo-pdf-invoice-builder/woocommerce-pdf-invoice.php 85% from 13 tests
The primary PHP file in "WooCommerce PDF Invoice Builder, Create invoices, packing slips and more" version 1.2.108 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Text Domain: The text domain name should consist of only dashes and lowercase characters
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-pdf-invoice-builder.php" instead of "woocommerce-pdf-invoice.php")
Code Analysis 0% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Please make sure to remedy the following
- You should never include executable (binary) or otherwise dangerous files in your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/woo-pdf-invoice-builder/vendor/phpqrcode/tools/merge.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 592 | 16,506 | 32,007 | 100,735 |
JavaScript | 83 | 3,277 | 2,381 | 20,250 |
CSS | 58 | 338 | 215 | 4,691 |
SVG | 12 | 0 | 0 | 3,161 |
HTML | 13 | 264 | 1 | 1,838 |
JSON | 19 | 3 | 0 | 1,098 |
Markdown | 11 | 319 | 0 | 1,031 |
TypeScript | 12 | 53 | 2 | 327 |
XML | 5 | 3 | 2 | 186 |
Smarty | 1 | 21 | 0 | 139 |
YAML | 3 | 12 | 2 | 48 |
Bourne Shell | 1 | 0 | 0 | 2 |
DOS Batch | 1 | 0 | 0 | 2 |
PHP code 0% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,487)
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 651)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 26.09 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1,487.00 |
Average method complexity | 4.48 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 651.00 |
Code structure | ||
---|---|---|
Namespaces | 55 | |
Interfaces | 7 | |
Traits | 0 | |
Classes | 552 | |
▷ Abstract classes | 30 | 5.43% |
▷ Concrete classes | 522 | 94.57% |
▷ Final classes | 3 | 0.57% |
Methods | 4,119 | |
▷ Static methods | 309 | 7.50% |
▷ Public methods | 3,492 | 84.78% |
▷ Protected methods | 367 | 8.91% |
▷ Private methods | 260 | 6.31% |
Functions | 90 | |
▷ Named functions | 65 | 72.22% |
▷ Anonymous functions | 25 | 27.78% |
Constants | 595 | |
▷ Global constants | 113 | 18.99% |
▷ Class constants | 482 | 81.01% |
▷ Public constants | 482 | 100.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
36 PNG files occupy 0.50MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/orderActions/view.png | 0.38KB | 0.50KB | 0.00% |
images/fullonly.png | 3.85KB | 1.16KB | ▼ 69.86% |
images/toolIcons/separator.png | 2.80KB | 0.11KB | ▼ 96.20% |
js/templates/PackingSlip.png | 10.76KB | 3.62KB | ▼ 66.32% |
images/toolIcons/start.png | 0.62KB | 0.88KB | 0.00% |