Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼11.66ms] Passed 4 tests
This is a short check of server-side resources used by WooCommerce PDF Invoices Maker
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 36.31 ▼4.28 |
Dashboard /wp-admin | 3.32 ▼0.03 | 44.74 ▼14.74 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 45.95 ▼6.11 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 79.42 ▼21.50 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 37.82 ▲5.87 |
Server storage [IO: ▲11.15MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 368 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WooCommerce PDF Invoices Maker
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲34 | 14.28 ▼0.39 | 1.90 ▲0.21 | 43.82 ▼0.27 |
Dashboard /wp-admin | 2,195 ▲15 | 5.54 ▼0.07 | 84.96 ▲0.52 | 36.56 ▼1.83 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.02 ▼0.01 | 39.55 ▼1.48 | 36.35 ▼3.04 |
Add New Post /wp-admin/post-new.php | 1,534 ▲8 | 23.30 ▲0.26 | 656.35 ▲10.83 | 66.48 ▲13.62 |
Media Library /wp-admin/upload.php | 1,406 ▲6 | 4.14 ▼0.04 | 101.15 ▼9.66 | 44.82 ▼0.32 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 take a closer look at the following
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/lib/php-css-parser/tests/quickdump.php
- 147× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/src/FrameReflower/TableRow.php:20
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/src/FrameDecorator/Block.php:20
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/includes/admin/sections/general/tab-server.php:22
- > PHP Fatal error
Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/src/Adapter/CPDF.php:37
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Style' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/lib/php-svg-lib/src/Svg/DefaultStyle.php:11
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Frame' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/src/FrameDecorator/AbstractFrameDecorator.php:30
- > PHP Fatal error
Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/src/Adapter/PDFLib.php:34
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/lib/php-font-lib/src/FontLib/Table/Type/os2.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/templates/invoice/invoice.php:12
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/wphobby-pdf-invoices-for-woocommerce/lib/dompdf/lib/php-svg-lib/src/Svg/Tag/Path.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: order, pdf, packing slip, billing, invoice...
wphobby-pdf-invoices-for-woocommerce/wphobby-woo-pdf-invoice.php 92% from 13 tests
The principal PHP file in "WooCommerce PDF Invoices Maker" v. 1.2.7 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wphobby-pdf-invoices-for-woocommerce.php" instead of "wphobby-woo-pdf-invoice.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin54,731 lines of code in 279 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 210 | 8,628 | 15,685 | 47,537 |
CSS | 41 | 2,155 | 122 | 5,622 |
Markdown | 6 | 255 | 0 | 909 |
XML | 6 | 3 | 2 | 201 |
SVG | 3 | 1 | 3 | 186 |
JSON | 5 | 0 | 0 | 139 |
YAML | 4 | 16 | 3 | 65 |
JavaScript | 3 | 16 | 3 | 55 |
HTML | 1 | 0 | 0 | 17 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 34.92 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 765.00 |
Average method complexity | 4.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 33 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 182 | |
▷ Abstract classes | 12 | 6.59% |
▷ Concrete classes | 170 | 93.41% |
▷ Final classes | 0 | 0.00% |
Methods | 2,019 | |
▷ Static methods | 81 | 4.01% |
▷ Public methods | 1,728 | 85.59% |
▷ Protected methods | 192 | 9.51% |
▷ Private methods | 99 | 4.90% |
Functions | 45 | |
▷ Named functions | 30 | 66.67% |
▷ Anonymous functions | 15 | 33.33% |
Constants | 163 | |
▷ Global constants | 8 | 4.91% |
▷ Class constants | 155 | 95.09% |
▷ Public constants | 155 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/default-logo.png | 17.10KB | 2.94KB | ▼ 82.80% |
includes/admin/images/icon.png | 19.99KB | 0.88KB | ▼ 95.61% |
assets/images/file.png | 5.09KB | 3.92KB | ▼ 22.99% |
lib/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |
assets/images/mail.png | 16.25KB | 13.04KB | ▼ 19.74% |