Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼330.46ms] Passed 4 tests
This is a short check of server-side resources used by WooCommerce Cart PDF
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.02 | 67.22 ▲10.41 |
Dashboard /wp-admin | 3.43 ▲0.02 | 49.61 ▲10.67 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 39.20 ▼2.68 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.08 | 95.72 ▼1,332.15 |
Media Library /wp-admin/upload.php | 3.30 ▲0.01 | 28.00 ▲2.60 |
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php | 4.62 | 84.80 |
Server storage [IO: ▲92.11MB] [DB: ▲0.00MB] 67% from 3 tests
Input-output and database impact of this plugin
These are issues you should consider
- Total filesystem usage must be limited to 25MB (currently using 92.11MB)
Filesystem: 623 new files
Database: no new tables, 2 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Cart PDF
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,780 ▲58 | 15.94 ▼0.06 | 6.25 ▲0.75 | 2.22 ▼0.04 |
Dashboard /wp-admin | 2,897 ▲36 | 6.15 ▼0.11 | 114.95 ▼23.38 | 155.76 ▼6.90 |
Posts /wp-admin/edit.php | 2,689 ▼1 | 3.24 ▲0.00 | 116.08 ▲51.51 | 153.38 ▲9.91 |
Add New Post /wp-admin/post-new.php | 1,701 ▼10 | 21.72 ▲0.32 | 459.95 ▲20.75 | 187.50 ▼14.97 |
Media Library /wp-admin/upload.php | 1,700 ▲2 | 5.50 ▼0.05 | 135.00 ▼0.32 | 187.12 ▼53.85 |
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php | 7,199 | 19.61 | 514.74 | 176.42 |
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
- This plugin did not uninstall successfully, leaving 2 options in the database
- widget_recent-posts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- 2 occurences, only the last one shown
- > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
- > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
Trying to get property 'title' of non-object
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 213× PHP files trigger server-side errors or warnings when accessed directly (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/Time.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/Sub.php:5
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Filter\\FilterException' not found in wp-content/plugins/wc-cart-pdf/vendor/setasign/fpdi/src/PdfParser/Filter/LzwException.php:16
- > PHP Fatal error
Uncaught Error: Interface 'DeepCopy\\Filter\\Filter' not found in wp-content/plugins/wc-cart-pdf/vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.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/SetHtmlPageFooter.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/B.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\SetHtmlPageFooter' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/SetPageHeader.php:5
- > PHP Fatal error
Uncaught Error: Class 'setasign\\Fpdi\\Tcpdf\\Fpdi' not found in wp-content/plugins/wc-cart-pdf/vendor/setasign/fpdi/src/TcpdfFpdi.php:20
- > 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\\InlineTag' not found in wp-content/plugins/wc-cart-pdf/vendor/mpdf/mpdf/src/Tag/Kbd.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
No plugin tags provided
wc-cart-pdf/wc-cart-pdf.php Passed 13 tests
The principal PHP file in "WooCommerce Cart PDF" v. 2.2.0 is loaded by WordPress automatically on each request
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 review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin77,086 lines of code in 403 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 389 | 11,065 | 11,645 | 76,125 |
CSS | 2 | 65 | 18 | 405 |
JSON | 1 | 0 | 0 | 326 |
YAML | 5 | 52 | 4 | 154 |
XML | 2 | 7 | 0 | 55 |
Markdown | 2 | 10 | 0 | 17 |
Bourne Shell | 1 | 2 | 0 | 3 |
JavaScript | 1 | 0 | 1 | 1 |
PHP code 0% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 7,009)
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 460)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 60.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7,009.00 |
Average method complexity | 14.17 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 460.00 |
Code structure | ||
---|---|---|
Namespaces | 44 | |
Interfaces | 10 | |
Traits | 6 | |
Classes | 279 | |
▷ Abstract classes | 9 | 3.23% |
▷ Concrete classes | 270 | 96.77% |
▷ Final classes | 13 | 4.81% |
Methods | 1,340 | |
▷ Static methods | 138 | 10.30% |
▷ Public methods | 1,157 | 86.34% |
▷ Protected methods | 55 | 4.10% |
▷ Private methods | 128 | 9.55% |
Functions | 47 | |
▷ Named functions | 23 | 48.94% |
▷ Anonymous functions | 24 | 51.06% |
Constants | 430 | |
▷ Global constants | 8 | 1.86% |
▷ Class constants | 422 | 98.14% |
▷ Public constants | 422 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin