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.05MB] [CPU: ▼2.05ms] Passed 4 tests
Analyzing server-side resources used by Ni WooCommerce Invoice
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 44.00 ▲2.27 |
Dashboard /wp-admin | 3.36 ▲0.05 | 47.64 ▼0.33 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 50.86 ▲1.79 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 93.06 ▼11.77 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 35.59 ▲2.10 |
Order List /wp-admin/admin.php?page=ni-woocommerce-invoice | 3.27 | 29.25 |
Addons /wp-admin/admin.php?page=ni-addons | 3.26 | 32.06 |
Setting /wp-admin/admin.php?page=ni-invoice-setting | 3.25 | 30.85 |
Server storage [IO: ▲8.77MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 334 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for Ni WooCommerce Invoice
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,826 ▲91 | 14.81 ▲0.14 | 1.84 ▼0.26 | 46.87 ▲7.01 |
Dashboard /wp-admin | 2,229 ▲41 | 5.99 ▲0.13 | 96.60 ▼15.06 | 85.78 ▲42.37 |
Posts /wp-admin/edit.php | 2,115 ▲23 | 2.01 ▼0.04 | 38.60 ▼1.08 | 34.33 ▲1.25 |
Add New Post /wp-admin/post-new.php | 1,545 ▲31 | 23.03 ▲5.28 | 709.20 ▲26.84 | 69.89 ▲7.51 |
Media Library /wp-admin/upload.php | 1,417 ▲29 | 4.25 ▲0.05 | 111.86 ▲9.51 | 47.66 ▲5.27 |
Order List /wp-admin/admin.php?page=ni-woocommerce-invoice | 869 | 2.12 | 32.32 | 27.04 |
Addons /wp-admin/admin.php?page=ni-addons | 1,176 | 2.01 | 22.59 | 33.19 |
Setting /wp-admin/admin.php?page=ni-invoice-setting | 832 | 2.16 | 25.71 | 27.13 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-css-parser/tests/quickdump.php
- 130× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-svg-lib/src/Svg/Tag/Circle.php:11
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Value/RuleValueList.php:5
- > PHP Notice
Undefined variable: rootDir in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/src/FrameDecorator/TableRowGroup.php:20
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Value/CSSString.php:5
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/CSSList/AtRuleBlockList.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-css-parser/tests/Sabberworm/CSS/OutputFormatTest.php:27
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/src/FrameDecorator/Text.php:22
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\RuleSet\\RuleSet' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php:18
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/ni-woocommerce-invoice/dompdf/lib/php-svg-lib/src/Svg/Tag/StyleTag.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: Add images for these screenshots: #1 (Order List With filter option.), #2 (Settings Options.)
ni-woocommerce-invoice/ni-woocommerce-invoice.php 92% from 13 tests
The principal PHP file in "Ni WooCommerce Invoice" v. 1.5.7 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Description: Please don't use more than 140 characters for the plugin description (currently 235 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin40,246 lines of code in 257 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 201 | 8,363 | 15,246 | 38,168 |
Markdown | 6 | 255 | 0 | 909 |
CSS | 32 | 143 | 67 | 722 |
XML | 6 | 3 | 2 | 201 |
JSON | 5 | 0 | 0 | 139 |
YAML | 4 | 16 | 3 | 65 |
HTML | 1 | 0 | 0 | 17 |
JavaScript | 1 | 3 | 2 | 17 |
SVG | 1 | 0 | 0 | 8 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 34.66 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 765.00 |
Average method complexity | 4.27 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 33 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 183 | |
▷ Abstract classes | 12 | 6.56% |
▷ Concrete classes | 171 | 93.44% |
▷ Final classes | 0 | 0.00% |
Methods | 1,997 | |
▷ Static methods | 81 | 4.06% |
▷ Public methods | 1,709 | 85.58% |
▷ Protected methods | 192 | 9.61% |
▷ Private methods | 96 | 4.81% |
Functions | 15 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 15 | 100.00% |
Constants | 157 | |
▷ Global constants | 2 | 1.27% |
▷ Class constants | 155 | 98.73% |
▷ 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
5 PNG files occupy 0.28MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 130.12KB | 32.88KB | ▼ 74.73% |
screenshot-3.png | 66.94KB | 19.41KB | ▼ 71.00% |
images/icon.png | 0.66KB | 0.66KB | 0.44% |
screenshot-1.png | 87.87KB | 26.82KB | ▼ 69.48% |
dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |