Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- The plugin cannot be installed
- > Error in wp-content/plugins/wc-invoice-pdf/wc-invoice-pdf.php+372
Uncaught Error: Call to a member function add_cap() on null in wp-content/plugins/wc-invoice-pdf/wc-invoice-pdf.php:372
Stack trace:
#0 wp-includes/class-wp-hook.php(310): WCInvoicePdf\WCInvoicePdf::install()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(693): do_action()
Server metrics [RAM: ▲0.00MB] [CPU: ▼2.57ms] Passed 4 tests
An overview of server-side resources used by WC Recurring Invoice Pdf
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.05 ▼1.24 |
Dashboard /wp-admin | 3.31 ▲0.00 | 47.50 ▼4.43 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 55.67 ▲5.64 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 95.23 ▼6.18 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.51 ▲1.56 |
Server storage [IO: ▲3.75MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 90 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_ispconfig_invoice |
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
WC Recurring Invoice Pdf: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.16 ▼1.17 | 1.68 ▼0.36 | 43.68 ▼4.55 |
Dashboard /wp-admin | 2,203 ▲15 | 5.94 ▲0.06 | 96.39 ▼12.19 | 37.74 ▼6.51 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 1.98 ▼0.05 | 38.48 ▼1.39 | 34.79 ▲1.35 |
Add New Post /wp-admin/post-new.php | 1,538 ▲19 | 23.26 ▲0.04 | 604.21 ▼63.35 | 49.25 ▼3.83 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.22 ▲0.04 | 94.65 ▼3.47 | 41.01 ▼3.73 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Zombie tables were found after uninstall: 1 table
- wp_ispconfig_invoice
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- db_upgraded
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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
- 14× GET requests to PHP files return non-empty strings (only 10 are shown):
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/barcode.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/dummy.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/color.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/encryption.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/imageObjectHash.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/imagetext.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/table-enhancements.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/image.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/imageInTable.php
- > /wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/examples/tables.php
- 6× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/tests/CpdfTest.php:5
- > CDummyItem
0
- > PHP Fatal error
Uncaught Error: Call to undefined function bcadd() in wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/src/include/TTF.php:1137
- > CDummyItem
1
- > 0.08070182800293
- > PHP Fatal error
Uncaught Error: Call to undefined function bcadd() in wp-content/plugins/wc-invoice-pdf/vendor/rospdf/pdf-php/src/include/TTF.php:1137
- > 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
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: automation, order, woocommerce, law, read-only...
wc-invoice-pdf/wc-invoice-pdf.php 92% from 13 tests
The primary PHP file in "WC Recurring Invoice Pdf" version 1.5.18 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Requires at least: Required version must be the same as the one declared in readme.txt ("3.1" instead of "3.0.0")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected10,671 lines of code in 50 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 35 | 1,595 | 2,231 | 9,916 |
PO File | 1 | 96 | 0 | 211 |
JavaScript | 2 | 53 | 27 | 201 |
Markdown | 2 | 39 | 0 | 85 |
XML | 3 | 1 | 2 | 72 |
JSON | 2 | 0 | 0 | 70 |
SVG | 1 | 0 | 0 | 66 |
YAML | 2 | 6 | 0 | 34 |
Bourne Shell | 1 | 3 | 0 | 9 |
Dockerfile | 1 | 3 | 0 | 7 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 169)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 55.97 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 619.00 |
Average method complexity | 5.72 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 169.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 32 | |
▷ Abstract classes | 1 | 3.12% |
▷ Concrete classes | 31 | 96.88% |
▷ Final classes | 0 | 0.00% |
Methods | 367 | |
▷ Static methods | 81 | 22.07% |
▷ Public methods | 264 | 71.93% |
▷ Protected methods | 15 | 4.09% |
▷ Private methods | 88 | 23.98% |
Functions | 24 | |
▷ Named functions | 2 | 8.33% |
▷ Anonymous functions | 22 | 91.67% |
Constants | 27 | |
▷ Global constants | 10 | 37.04% |
▷ Class constants | 17 | 62.96% |
▷ Public constants | 17 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/rospdf/pdf-php/examples/images/test_indexed.png | 8.12KB | 8.00KB | ▼ 1.48% |
invoicepdf.png | 1.01KB | 0.73KB | ▼ 27.47% |
vendor/rospdf/pdf-php/examples/images/test_indexed_transparent.png | 7.97KB | 7.89KB | ▼ 1.05% |
vendor/rospdf/pdf-php/examples/images/test_alpha.png | 24.23KB | 8.43KB | ▼ 65.19% |
vendor/rospdf/pdf-php/examples/images/test_grayscaled_alpha.png | 4.37KB | 5.04KB | 0.00% |