Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.56MB] [CPU: ▼290.23ms] Passed 4 tests
A check of server-side resources used by WP-Invoice - Web Invoice and Billing
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.03 ▲0.52 | 56.00 ▲5.10 |
Dashboard /wp-admin | 4.02 ▲0.62 | 897.90 ▲866.11 |
Posts /wp-admin/edit.php | 4.24 ▲0.60 | 46.12 ▲8.98 |
Add New Post /wp-admin/post-new.php | 7.52 ▲0.52 | 98.21 ▼1,181.81 |
Media Library /wp-admin/upload.php | 3.89 ▲0.60 | 29.13 ▲6.82 |
Server storage [IO: ▲26.84MB] [DB: ▲0.02MB] 67% from 3 tests
Input-output and database impact of this plugin
It is recommended to fix the following issues
- Total filesystem usage should be limited to 25MB (currently using 26.84MB)
Filesystem: 1,607 new files
Database: 1 new table, 10 new options
New tables |
---|
wp_wpi_object_log |
New WordPress options |
---|
udl_wp-invoice/wp-invoice-url |
widget_invoicelookupwidget |
wp-invoice-splash-version |
widget_invoice_history |
wp-invoice-current-version |
ud_prod_AB8k6zVmTfBlJj |
wpi_options |
wpi_activation_time |
wp_invoice_version |
ud_ping_wp-invoicewp-invoice |
Browser metrics Passed 4 tests
An overview of browser requirements for WP-Invoice - Web Invoice and Billing
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,073 ▼1,681 | 15.22 ▼0.38 | 5.39 ▼0.50 | 2.36 ▲0.07 |
Dashboard /wp-admin | 3,018 ▲160 | 6.54 ▲0.35 | 135.27 ▲2.87 | 207.93 ▲50.33 |
Posts /wp-admin/edit.php | 2,819 ▲134 | 3.30 ▲0.07 | 64.87 ▲1.84 | 210.60 ▲67.51 |
Add New Post /wp-admin/post-new.php | 1,745 ▲84 | 16.10 ▼0.08 | 433.43 ▼6.81 | 156.98 ▲0.31 |
Media Library /wp-admin/upload.php | 1,823 ▲125 | 5.68 ▲0.22 | 128.14 ▼9.36 | 221.04 ▲32.90 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Zombie tables were found after uninstall: 1 table
- wp_wpi_object_log
- This plugin does not fully uninstall, leaving 10 options in the database
- ud_ping_wp-invoicewp-invoice
- widget_invoicelookupwidget
- wp_invoice_version
- udl_wp-invoice/wp-invoice-url
- wpi_activation_time
- widget_invoice_history
- wp-invoice-splash-version
- ud_prod_AB8k6zVmTfBlJj
- wpi_options
- wp-invoice-current-version
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 | 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 items
- 8× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wp-invoice/lib/gateways/js/wpi_gateways.js.php
- > /wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/vendor/phenx/php-font-lib/index.php
- > /wp-content/plugins/wp-invoice/lib/gateways/templates/payment_header.tpl.php
- > /wp-content/plugins/wp-invoice/vendor/usabilitydynamics/lib-ud-api-client/static/templates/admin-notice.php
- > /wp-content/plugins/wp-invoice/lib/third-party/stripe/test/Stripe.php
- > /wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/vendor/phenx/php-font-lib/www/font_list.php
- > /wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/lib/third-party/dompdf/lib/php-css-parser/tests/quickdump.php
- > /wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/vendor/phenx/php-font-lib/www/index.php
- 355× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/static/views/pdf_quote_remastered.php:114
- > PHP Fatal error
Uncaught Error: Class 'Stripe_Util_Set' not found in wp-content/plugins/wp-invoice/lib/third-party/stripe/lib/Stripe/Object.php:9
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSList' not found in wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/lib/third-party/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/CSSList/CSSBlockList.php:16
- > PHP Fatal error
Uncaught Error: Class 'Font_Binary_Stream' not found in wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/vendor/phenx/php-font-lib/classes/Font_Table_Directory_Entry.php:14
- > PHP Fatal error
Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/wp-invoice/lib/third-party/stripe/lib/Stripe/Transfer.php:3
- > PHP Warning
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/lib/third-party/dompdf/lib/Cpdf.php on line 481
- > PHP Fatal error
Uncaught Error: Class 'wpi_gateway_base' not found in wp-content/plugins/wp-invoice/lib/gateways/class_wpi_paypal.php:11
- > PHP Fatal error
Uncaught Error: Class 'UsabilityDynamics\\WP\\Bootstrap_Plugin' not found in wp-content/plugins/wp-invoice/addons/wp-invoice-quotes/lib/classes/class-WPI_Q_Bootstrap.php:11
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/wp-invoice/addons/wp-invoice-pdf/lib/third-party/dompdf/lib/php-svg-lib/src/Svg/Tag/Circle.php:11
- > PHP Fatal error
Uncaught Error: Class 'UsabilityDynamics\\WP\\Bootstrap_Plugin' not found in wp-content/plugins/wp-invoice/addons/wp-invoice-spc/lib/classes/class-WPI_SPC_Bootstrap.php:11
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% 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
These attributes need to be fixed:
- Screenshots: These screenshots require images: #1 (Add can add custom payments and charges), #2 (Insert pre-defined line items and discounts), #3 (Quickly view invoice status and progression), #4 (Easily filter and find invoices), #5 (Show invoice receipts and invoice history), #6 (Create notification e-mail templates), #7 (Create pre-defined line items), #8 (View 3 standard reports - collected vs uncollected invoices, 10 most valuable clients and top grossing line items)
- Tags: You are using too many tags: 18 tag instead of maximum 10
wp-invoice/wp-invoice.php 92% from 13 tests
The principal PHP file in "WP-Invoice - Web Invoice and Billing" v. 4.3.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Description: Please keep the plugin description shorter than 140 characters (currently 195 characters long)
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please make sure to remedy the following
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/wp-invoice/lib/third-party/stripe/lib/data/ca-certificates.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 501 | 17,032 | 27,853 | 90,585 |
PO File | 32 | 28,917 | 69,771 | 33,751 |
JavaScript | 531 | 5,993 | 6,501 | 28,181 |
CSS | 68 | 560 | 666 | 8,316 |
LESS | 12 | 438 | 148 | 4,476 |
JSON | 39 | 0 | 0 | 2,944 |
Markdown | 39 | 628 | 0 | 2,090 |
HTML | 9 | 14 | 0 | 761 |
XML | 7 | 3 | 3 | 287 |
SVG | 1 | 0 | 0 | 264 |
YAML | 6 | 20 | 3 | 79 |
Bourne Shell | 1 | 17 | 0 | 46 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
- 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 | 27.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 765.00 |
Average method complexity | 4.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 49 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 428 | |
▷ Abstract classes | 21 | 4.91% |
▷ Concrete classes | 407 | 95.09% |
▷ Final classes | 12 | 2.95% |
Methods | 3,629 | |
▷ Static methods | 590 | 16.26% |
▷ Public methods | 3,216 | 88.62% |
▷ Protected methods | 255 | 7.03% |
▷ Private methods | 158 | 4.35% |
Functions | 169 | |
▷ Named functions | 133 | 78.70% |
▷ Anonymous functions | 36 | 21.30% |
Constants | 252 | |
▷ Global constants | 22 | 8.73% |
▷ Class constants | 230 | 91.27% |
▷ Public constants | 230 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
76 PNG files occupy 0.17MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/usabilitydynamics/lib-ud-api-client/static/images/ud.png | 10.34KB | 5.31KB | ▼ 48.69% |
addons/wp-invoice-pdf/lib/third-party/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |
vendor/usabilitydynamics/lib-ui/static/styles/fields/jqueryui/img/ui-bg_glass_95_fef1ec_1x400.png | 0.12KB | 0.14KB | 0.00% |
addons/wp-invoice-pdf/vendor/phenx/php-font-lib/www/css/ui-lightness/images/ui-icons_ef8c08_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
static/img/wp-invoice.png | 4.37KB | 2.23KB | ▼ 49.05% |