Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.26MB] [CPU: ▼3.78ms] Passed 4 tests
A check of server-side resources used by Document Engine - Download Posts as PDF, PDF Embedder
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.74 ▲0.28 | 41.47 ▼5.59 |
Dashboard /wp-admin | 3.61 ▲0.30 | 51.12 ▼2.11 |
Posts /wp-admin/edit.php | 3.66 ▲0.30 | 49.27 ▲2.37 |
Add New Post /wp-admin/post-new.php | 6.13 ▲0.24 | 89.80 ▼4.58 |
Media Library /wp-admin/upload.php | 3.47 ▲0.23 | 36.08 ▼2.85 |
Documents /wp-admin/admin.php?page=document-engine-settings | 3.73 | 43.07 |
Server storage [IO: ▲17.70MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 631 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Document Engine - Download Posts as PDF, PDF Embedder
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,895 ▲124 | 14.31 ▼0.33 | 1.63 ▼0.47 | 41.96 ▼5.23 |
Dashboard /wp-admin | 2,284 ▲104 | 5.69 ▼0.02 | 86.62 ▼7.77 | 78.70 ▲38.98 |
Posts /wp-admin/edit.php | 2,201 ▲101 | 1.99 ▼0.04 | 34.68 ▼5.80 | 33.78 ▼5.63 |
Add New Post /wp-admin/post-new.php | 6,463 ▲4,932 | 27.84 ▲4.63 | 924.04 ▲288.22 | 40.36 ▼12.78 |
Media Library /wp-admin/upload.php | 1,504 ▲101 | 4.24 ▲0.01 | 98.74 ▼2.42 | 74.76 ▲29.33 |
Documents /wp-admin/admin.php?page=document-engine-settings | 1,269 | 3.82 | 61.19 | 60.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
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 | 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
- 217× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Tag/Figure.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Tag/Li.php:5
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Writer/MetadataWriter.php:13
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Tag/BarCode.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Barcode\\AbstractBarcode' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Barcode/I25.php:10
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\Meter' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Tag/Progress.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function document_engine_pdf_header_logo() in wp-content/plugins/document-engine/templates/pdf-header.php:5
- > PHP Fatal error
Trait 'Mpdf\\Strict' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Writer/FontWriter.php on line 10
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Tag/H2.php:5
- > PHP Fatal error
Uncaught Error: Class 'Mpdf\\Barcode\\AbstractBarcode' not found in wp-content/plugins/document-engine/vendor/mpdf/mpdf/src/Barcode/EanExt.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: create pdf, generate pdf, wordpress to pdf, pdf maker, pdf viewer
document-engine/document-engine.php Passed 13 tests
The principal PHP file in "Document Engine - Download Posts as PDF, PDF Embedder" v. 1.0.12 is loaded by WordPress automatically on each request
56 characters long description:
Convert any post type to PDF document & PDF viewer block
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected92,585 lines of code in 452 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 409 | 11,634 | 11,801 | 77,200 |
SVG | 4 | 0 | 1 | 9,620 |
CSS | 7 | 1,595 | 30 | 3,677 |
Markdown | 9 | 385 | 0 | 1,179 |
JSON | 6 | 0 | 0 | 548 |
YAML | 7 | 58 | 4 | 196 |
JavaScript | 6 | 25 | 5 | 87 |
XML | 3 | 10 | 0 | 75 |
Bourne Shell | 1 | 2 | 0 | 3 |
PHP code 0% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
- Class cyclomatic complexity has to be reduced 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 | 58.32 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7,024.00 |
Average method complexity | 13.59 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 460.00 |
Code structure | ||
---|---|---|
Namespaces | 49 | |
Interfaces | 10 | |
Traits | 6 | |
Classes | 295 | |
▷ Abstract classes | 10 | 3.39% |
▷ Concrete classes | 285 | 96.61% |
▷ Final classes | 15 | 5.26% |
Methods | 1,422 | |
▷ Static methods | 173 | 12.17% |
▷ Public methods | 1,232 | 86.64% |
▷ Protected methods | 57 | 4.01% |
▷ Private methods | 133 | 9.35% |
Functions | 64 | |
▷ Named functions | 41 | 64.06% |
▷ Anonymous functions | 23 | 35.94% |
Constants | 436 | |
▷ Global constants | 14 | 3.21% |
▷ Class constants | 422 | 96.79% |
▷ Public constants | 422 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/upload-image.png | 2.57KB | 1.94KB | ▼ 24.52% |