Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.49ms] Passed 4 tests
Server-side resources used by Invoices for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.26 ▼0.12 |
Dashboard /wp-admin | 3.32 ▼0.03 | 43.23 ▼15.43 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 46.64 ▲2.20 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 93.14 ▲4.23 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 35.83 ▼0.60 |
Server storage [IO: ▲30.60MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
- Total filesystem usage should be limited to 25MB (currently using 30.60MB)
Filesystem: 389 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Invoices for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.28 ▼1.10 | 1.55 ▼0.26 | 40.75 ▼5.48 |
Dashboard /wp-admin | 2,203 ▲12 | 4.81 ▼1.09 | 109.71 ▼6.72 | 42.08 ▼19.73 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 2.00 ▼0.06 | 39.04 ▲4.09 | 35.91 ▲2.23 |
Add New Post /wp-admin/post-new.php | 1,533 ▲12 | 23.35 ▲0.16 | 597.69 ▼9.23 | 49.39 ▼2.76 |
Media Library /wp-admin/upload.php | 1,379 ▼12 | 4.20 ▼0.02 | 99.31 ▼1.13 | 42.88 ▼1.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
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
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 8× PHP files output text when accessed directly:
- > /wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/compress.php
- > /wp-content/plugins/woocommerce-pdf-invoices/includes/admin/views/html-order-page-pdf-invoice-meta-box.php
- > /wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/utils/font_dump.php
- > /wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/utils/index.php
- > /wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/utils/image_details.php
- > /wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/utils/font_coverage.php
- > /wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/utils/font_names.php
- > /wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/utils/font_collections.php
- 66× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
include_once(_JPGRAPH_PATHjpgraph_scatter.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/graph.php on line 26
- > PHP Warning
include_once(_JPGRAPH_PATHjpgraph_bar.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/graph.php on line 30
- > PHP Notice
Undefined index: filename in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/includes/out.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_url() in wp-content/plugins/woocommerce-pdf-invoices/includes/admin/views/html-deactivation-notice.php:16
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Autoload\\AutoloadGenerator' not found in wp-content/plugins/woocommerce-pdf-invoices/vendor/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php:30
- > PHP Notice
Undefined index: opname in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/includes/out.php on line 11
- > PHP Warning
Use of undefined constant _JPGRAPH_PATH - assumed '_JPGRAPH_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/graph.php on line 25
- > PHP Warning
include_once(): Failed opening '_JPGRAPH_PATHjpgraph_scatter.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/graph.php on line 26
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/config_fonts-distr-without-OTL.php:16
- > PHP Warning
include_once(_JPGRAPH_PATHjpgraph_pie3d.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/graph.php on line 29
- > PHP Warning
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)
No browser issues were found
Optimizations
Plugin configuration 79% from 29 tests
readme.txt 81% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== woocommerce-pdf-invoices ===
) - Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
- Donate link: Invalid URI ("")
woocommerce-pdf-invoices/bootstrap.php 77% from 13 tests
This is the main PHP file of "Invoices for WooCommerce" version 3.1.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-pdf-invoices.php" instead of "bootstrap.php")
- Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)
- Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0.0")
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected92,172 lines of code in 206 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 172 | 8,367 | 11,827 | 76,853 |
PO File | 15 | 5,885 | 9,997 | 13,839 |
CSS | 7 | 120 | 33 | 956 |
JSON | 4 | 12 | 0 | 223 |
JavaScript | 3 | 39 | 8 | 144 |
Markdown | 3 | 51 | 0 | 125 |
XML | 1 | 3 | 0 | 16 |
YAML | 1 | 4 | 0 | 16 |
PHP code 0% from 2 tests
A short review of cyclomatic complexity and code structure
Please fix the following
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 8,309)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 1,542)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 257.59 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 8,309.00 |
Average method complexity | 15.76 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1,542.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 70 | |
▷ Abstract classes | 5 | 7.14% |
▷ Concrete classes | 65 | 92.86% |
▷ Final classes | 1 | 1.54% |
Methods | 1,219 | |
▷ Static methods | 188 | 15.42% |
▷ Public methods | 1,116 | 91.55% |
▷ Protected methods | 74 | 6.07% |
▷ Private methods | 29 | 2.38% |
Functions | 40 | |
▷ Named functions | 37 | 92.50% |
▷ Anonymous functions | 3 | 7.50% |
Constants | 390 | |
▷ Global constants | 59 | 15.13% |
▷ Class constants | 331 | 84.87% |
▷ Public constants | 331 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/packing-slip-icon.png | 0.58KB | 0.46KB | ▼ 20.57% |
assets/images/star-icon.png | 1.41KB | 1.23KB | ▼ 13.01% |
assets/images/invoice-icon.png | 0.60KB | 0.48KB | ▼ 19.61% |
assets/images/delete-icon.png | 5.52KB | 1.24KB | ▼ 77.44% |