Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼10.28ms] Passed 4 tests
An overview of server-side resources used by Invoice for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.80 ▼0.60 |
Dashboard /wp-admin | 3.31 ▲0.00 | 48.88 ▲1.85 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.04 ▼14.11 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 83.67 ▼27.00 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.28 ▲0.58 |
Server storage [IO: ▲21.26MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 944 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Invoice for WooCommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,812 ▲66 | 13.24 ▼1.51 | 1.70 ▼0.14 | 33.76 ▼9.72 |
Dashboard /wp-admin | 2,218 ▲30 | 4.88 ▼0.97 | 111.50 ▼4.72 | 44.29 ▲1.39 |
Posts /wp-admin/edit.php | 2,101 ▲9 | 2.01 ▼0.00 | 34.80 ▼0.71 | 36.51 ▼0.53 |
Add New Post /wp-admin/post-new.php | 1,546 ▲13 | 23.19 ▲0.10 | 656.09 ▼1.56 | 50.67 ▼9.06 |
Media Library /wp-admin/upload.php | 1,403 ▲15 | 4.20 ▼0.05 | 98.21 ▼7.66 | 46.95 ▲0.96 |
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
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
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 take a closer look at the following
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/invoice-for-woocommerce/inc/pdf/compress.php
- > /wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/lib/php-css-parser/tests/quickdump.php
- 225× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 71
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/autoload.inc.php:29
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/src/FrameReflower/Inline.php:19
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 4
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 72
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Style' not found in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/lib/php-svg-lib/src/Svg/DefaultStyle.php:11
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Parsing\\SourceException' not found in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Parsing/OutputException.php:8
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/src/FrameReflower/NullFrameReflower.php:19
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/invoice-for-woocommerce/inc/pdf/dompdf/src/FrameDecorator/Text.php:22
- > PHP Warning
include_once(): Failed opening '_JPGRAPH_PATHjpgraph_scatter.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/invoice-for-woocommerce/inc/pdf/graph.php on line 26
- > PHP Notice
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 96% from 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
9 plugin tags: pdf, invoice pdf, eu invoice, invoices, woocommerce...
invoice-for-woocommerce/invoice-for-woocommerce.php 92% from 13 tests
The main PHP script in "Invoice for WooCommerce" version 2.1.1 is automatically included on every request by WordPress
It is important to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 362 characters long)
Code Analysis 95% from 3 tests
File types Passed 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
Everything looks great! No dangerous files found in this plugin145,249 lines of code in 404 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 322 | 14,942 | 22,985 | 141,780 |
CSS | 49 | 257 | 94 | 1,477 |
Markdown | 8 | 299 | 0 | 1,009 |
PO File | 1 | 117 | 118 | 302 |
XML | 7 | 6 | 2 | 210 |
JSON | 6 | 12 | 0 | 194 |
JavaScript | 4 | 40 | 26 | 150 |
YAML | 5 | 23 | 2 | 102 |
HTML | 1 | 0 | 0 | 17 |
SVG | 1 | 0 | 0 | 8 |
PHP code 0% from 2 tests
Analyzing cyclomatic complexity and code structure
Please fix the following
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 8,314)
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 1,542)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.50 |
Average class complexity | 110.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 8,314.00 |
Average method complexity | 9.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1,542.00 |
Code structure | ||
---|---|---|
Namespaces | 35 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 210 | |
▷ Abstract classes | 12 | 5.71% |
▷ Concrete classes | 198 | 94.29% |
▷ Final classes | 0 | 0.00% |
Methods | 2,819 | |
▷ Static methods | 169 | 6.00% |
▷ Public methods | 2,509 | 89.00% |
▷ Protected methods | 231 | 8.19% |
▷ Private methods | 79 | 2.80% |
Functions | 113 | |
▷ Named functions | 97 | 85.84% |
▷ Anonymous functions | 16 | 14.16% |
Constants | 536 | |
▷ Global constants | 51 | 9.51% |
▷ Class constants | 485 | 90.49% |
▷ Public constants | 485 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.31MB with 0.16MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
banner-772x250.png | 224.97KB | 79.22KB | ▼ 64.79% |
inc/images/remove.png | 28.49KB | 13.99KB | ▼ 50.88% |
inc/images/load.png | 61.33KB | 18.21KB | ▼ 70.31% |
inc/pdf/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |