Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.25MB] [CPU: ▼2.38ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce Cart PDF
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.74 ▲0.27 | 41.44 ▲3.65 |
Dashboard /wp-admin | 3.56 ▲0.21 | 45.93 ▼13.38 |
Posts /wp-admin/edit.php | 3.67 ▲0.32 | 51.32 ▲1.52 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.27 | 91.28 ▼1.32 |
Media Library /wp-admin/upload.php | 3.48 ▲0.25 | 35.90 ▲4.92 |
Server storage [IO: ▲92.23MB] [DB: ▲0.07MB] 67% from 3 tests
Input-output and database impact of this plugin
Just a few items left to fix
- Try to limit filesystem usage to 25MB (currently using 92.23MB)
Filesystem: 664 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for WooCommerce Cart PDF
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲31 | 14.20 ▼0.16 | 1.65 ▲0.18 | 40.81 ▲1.85 |
Dashboard /wp-admin | 2,198 ▲18 | 5.60 ▼0.06 | 92.37 ▼5.85 | 37.99 ▼3.05 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 1.94 ▼0.00 | 38.12 ▼2.75 | 34.95 ▲0.84 |
Add New Post /wp-admin/post-new.php | 1,649 ▲109 | 22.26 ▼0.85 | 632.12 ▼8.92 | 57.61 ▼9.40 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.21 ▲0.01 | 97.68 ▲1.93 | 40.02 ▼0.64 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 232× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/Span.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\MpdfException' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Exception/FontException.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/Table.php:8
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/Font.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/BarCode.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/Sup.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\FormFeed' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/TocPageBreak.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/Meter.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-cart-pdf/wc-cart-pdf-compatibility.php:17
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/B.php:5
- > 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 on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
No plugin tags provided
wc-cart-pdf/wc-cart-pdf.php Passed 13 tests
The main PHP script in "WooCommerce Cart PDF" version 2.7.0 is automatically included on every request by WordPress
48 characters long description:
Allows customers to download their cart as a PDF
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin79,043 lines of code in 443 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 421 | 11,656 | 13,003 | 77,776 |
JSON | 3 | 0 | 0 | 571 |
CSS | 3 | 65 | 18 | 406 |
YAML | 7 | 58 | 4 | 196 |
XML | 2 | 7 | 0 | 55 |
Markdown | 4 | 14 | 0 | 34 |
Bourne Shell | 1 | 2 | 0 | 3 |
JavaScript | 2 | 0 | 2 | 2 |
PHP code 0% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 7,024)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 460)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 55.71 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7,024.00 |
Average method complexity | 13.34 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 460.00 |
Code structure | ||
---|---|---|
Namespaces | 49 | |
Interfaces | 25 | |
Traits | 6 | |
Classes | 293 | |
▷ Abstract classes | 9 | 3.07% |
▷ Concrete classes | 284 | 96.93% |
▷ Final classes | 14 | 4.93% |
Methods | 1,523 | |
▷ Static methods | 144 | 9.46% |
▷ Public methods | 1,326 | 87.07% |
▷ Protected methods | 55 | 3.61% |
▷ Private methods | 142 | 9.32% |
Functions | 59 | |
▷ Named functions | 26 | 44.07% |
▷ Anonymous functions | 33 | 55.93% |
Constants | 432 | |
▷ Global constants | 8 | 1.85% |
▷ Class constants | 424 | 98.15% |
▷ Public constants | 424 | 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
There were not PNG files found in your plugin