Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
- Install procedure validation failed for this plugin
- > Warning in wp-content/plugins/wp-pdf-templates/wp-pdf-templates.php+172
copy(wp-content/plugins/wp-pdf-templatesvendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.dist.php): failed to open stream: No such file or directory
Server metrics [RAM: ▲0.05MB] [CPU: ▼3.37ms] Passed 4 tests
Server-side resources used by WordPress PDF Templates
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 41.71 ▲0.36 |
Dashboard /wp-admin | 3.35 ▲0.05 | 49.63 ▼0.48 |
Posts /wp-admin/edit.php | 3.42 ▲0.06 | 54.13 ▲3.04 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 87.25 ▼14.28 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 37.65 ▲0.94 |
Server storage [IO: ▲15.78MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 550 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WordPress PDF Templates
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.34 ▼0.01 | 1.85 ▲0.05 | 42.84 ▼6.96 |
Dashboard /wp-admin | 2,192 ▲12 | 5.62 ▼0.05 | 93.71 ▲2.46 | 41.60 ▲1.89 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.02 ▲0.06 | 40.92 ▲0.51 | 36.75 ▼3.74 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 23.03 ▲0.22 | 646.50 ▲10.03 | 51.01 ▲0.48 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.25 ▲0.09 | 102.48 ▲2.21 | 44.43 ▼0.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- The plugin did not uninstall gracefully
- > Warning in wp-content/plugins/wp-pdf-templates/uninstall.php+27
rmdir(wp-content/uploads/dompdf-fonts): Directory not empty
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
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
Good news, no errors were detected
SRP 0% 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
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/wp-pdf-templates/load_font.php
- > /wp-content/plugins/wp-pdf-templates/dompdf/load_font.php
- 377× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-pdf-templates/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php:9
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Header' not found in wp-content/plugins/wp-pdf-templates/vendor/phenx/php-font-lib/src/FontLib/EOT/Header.php:21
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-pdf-templates/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php:4
- > PHP Warning
Use of undefined constant DOMPDF_DIR - assumed 'DOMPDF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-pdf-templates/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 27
- > PHP Warning
Use of undefined constant DOMPDF_DIR - assumed 'DOMPDF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-pdf-templates/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 54
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/wp-pdf-templates/vendor/dompdf/dompdf/src/Positioner/ListBullet.php:19
- > PHP Warning
Use of undefined constant DOMPDF_LIB_DIR - assumed 'DOMPDF_LIB_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-pdf-templates/dompdf/include/stylesheet.cls.php on line 15
- > PHP Notice
Undefined variable: rootDir in wp-content/plugins/wp-pdf-templates/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 70
- > PHP Warning
Use of undefined constant DOMPDF_DIR - assumed 'DOMPDF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-pdf-templates/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 7
- > PHP Fatal error
Uncaught Error: Class 'Frame_Reflower' not found in wp-content/plugins/wp-pdf-templates/dompdf/include/text_frame_reflower.cls.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: seravo, dompdf, templates, print, pdf
wp-pdf-templates/wp-pdf-templates.php Passed 13 tests
The primary PHP file in "WordPress PDF Templates" version 1.4.3 is used by WordPress to initiate all plugin functionality
124 characters long description:
This plugin utilises the DOMPDF Library to provide a URL endpoint e.g. /my-post/pdf/ that generates a downloadable PDF file.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin52,464 lines of code in 394 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 367 | 14,216 | 23,052 | 50,921 |
Markdown | 9 | 165 | 0 | 563 |
JSON | 9 | 0 | 0 | 479 |
CSS | 1 | 88 | 42 | 378 |
XML | 3 | 3 | 0 | 57 |
YAML | 3 | 12 | 0 | 48 |
HTML | 2 | 0 | 0 | 18 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
It is recommended to fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 653)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 29.29 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 766.00 |
Average method complexity | 4.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 653.00 |
Code structure | ||
---|---|---|
Namespaces | 26 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 350 | |
▷ Abstract classes | 14 | 4.00% |
▷ Concrete classes | 336 | 96.00% |
▷ Final classes | 0 | 0.00% |
Methods | 2,954 | |
▷ Static methods | 140 | 4.74% |
▷ Public methods | 2,486 | 84.16% |
▷ Protected methods | 359 | 12.15% |
▷ Private methods | 109 | 3.69% |
Functions | 79 | |
▷ Named functions | 66 | 83.54% |
▷ Anonymous functions | 13 | 16.46% |
Constants | 330 | |
▷ Global constants | 15 | 4.55% |
▷ Class constants | 315 | 95.45% |
▷ Public constants | 315 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 1.27MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 8.83KB | 5.46KB | ▼ 38.12% |
dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |
assets/banner-1544x500.png | 18.62KB | 7.36KB | ▼ 60.46% |
assets/banner-772x250.png | 13.73KB | 6.67KB | ▼ 51.40% |
assets/screenshot-1.png | 1,237.33KB | 358.07KB | ▼ 71.06% |