Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.92MB] [CPU: ▲1.38ms] Passed 4 tests
Analyzing server-side resources used by PDF Generator for WordPress - Create & Customize PDF for Posts, Pages and WooCommerce Products
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.05 ▲0.59 | 43.18 ▲2.60 |
Dashboard /wp-admin | 4.43 ▲1.13 | 54.04 ▲4.47 |
Posts /wp-admin/edit.php | 4.28 ▲0.92 | 33.69 ▼12.23 |
Add New Post /wp-admin/post-new.php | 6.98 ▲1.09 | 99.14 ▲12.53 |
Media Library /wp-admin/upload.php | 4.30 ▲1.07 | 41.35 ▲10.66 |
PDF Generator For WP /wp-admin/admin.php?page=pdf_generator_for_wp_menu | 4.32 | 50.67 |
Home /wp-admin/admin.php?page=home | 4.31 | 43.79 |
Server storage [IO: ▲25.22MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
- Filesystem usage must be lower than 25MB (currently using 25.22MB)
Filesystem: 800 new files
Database: no new tables, 15 new options
New WordPress options |
---|
pgfw_save_admin_display_settings |
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
pgfw_body_save_settings |
pgfw_advanced_save_settings |
pgfw_meta_fields_save_settings |
db_upgraded |
wps_all_plugins_active |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for PDF Generator for WordPress - Create & Customize PDF for Posts, Pages and WooCommerce Products
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,945 ▲183 | 13.42 ▼1.29 | 8.91 ▲7.24 | 36.97 ▼7.68 |
Dashboard /wp-admin | 2,212 ▲35 | 5.57 ▼0.11 | 94.47 ▼5.86 | 62.71 ▲18.25 |
Posts /wp-admin/edit.php | 2,142 ▲39 | 1.97 ▲0.00 | 39.75 ▼0.57 | 33.46 ▼1.88 |
Add New Post /wp-admin/post-new.php | 1,552 ▲26 | 23.77 ▲0.21 | 615.07 ▼87.17 | 121.96 ▲65.68 |
Media Library /wp-admin/upload.php | 1,432 ▲32 | 4.13 ▼0.13 | 99.85 ▼5.40 | 79.05 ▲32.20 |
PDF Generator For WP /wp-admin/admin.php?page=pdf_generator_for_wp_menu | 2,240 | 5.82 | 111.48 | 191.73 |
Home /wp-admin/admin.php?page=home | 1,151 | 5.26 | 83.80 | 101.67 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin did not uninstall successfully, leaving 15 options in the database
- pgfw_footer_setting_submit
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- pgfw_header_setting_submit
- pgfw_general_settings_save
- pgfw_pdf_upload_save_settings
- widget_recent-posts
- pgfw_advanced_save_settings
- db_upgraded
- ...
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=home
- > Warning in wp-includes/functions.php+6935
Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)
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
Almost there! Just fix the following items
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/pdf-generator-for-wp/common/partials/pdf-generator-for-wp-common-display.php
- > /wp-content/plugins/pdf-generator-for-wp/public/partials/pdf-generator-for-wp-public-display.php
- > /wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/sabberworm/php-css-parser/tests/quickdump.php
- 191× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/dompdf/dompdf/src/Positioner/TableCell.php:19
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\TrueType\\Header' not found in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/phenx/php-font-lib/src/FontLib/WOFF/Header.php:16
- > PHP Fatal error
Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/dompdf/dompdf/src/Adapter/GD.php:24
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/dompdf/dompdf/src/Positioner/Absolute.php:16
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 64
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 9
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 41
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 11
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Parsing\\SourceException' not found in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/OutputException.php:8
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/pdf-generator-for-wp/package/lib/dompdf/vendor/phenx/php-font-lib/src/FontLib/Table/Type/nameRecord.php:18
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=home
- > Network (severe)
wp-content/plugins/pdf-generator-for-wp/admin/src/fonts/nunito-sans/NunitoSans-Regular.ttf - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: pdf generator, pdf creator, wordpress pdf generator, pdf, pdf maker
pdf-generator-for-wp/pdf-generator-for-wp.php 92% from 13 tests
This is the main PHP file of "PDF Generator for WordPress - Create & Customize PDF for Posts, Pages and WooCommerce Products" version 1.2.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 464 characters long)
Code Analysis 97% 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 plugin179,942 lines of code in 544 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 303 | 10,417 | 21,754 | 90,126 |
SVG | 41 | 4 | 1 | 36,072 |
HTML | 68 | 1,733 | 0 | 24,460 |
JavaScript | 27 | 4,189 | 14,319 | 14,325 |
CSS | 72 | 1,500 | 282 | 8,869 |
XML | 17 | 63 | 109 | 3,490 |
PO File | 1 | 533 | 686 | 1,211 |
Markdown | 6 | 265 | 0 | 947 |
JSON | 6 | 0 | 0 | 378 |
YAML | 3 | 12 | 2 | 64 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 36.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 797.00 |
Average method complexity | 4.45 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 35 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 218 | |
▷ Abstract classes | 12 | 5.50% |
▷ Concrete classes | 206 | 94.50% |
▷ Final classes | 0 | 0.00% |
Methods | 2,370 | |
▷ Static methods | 146 | 6.16% |
▷ Public methods | 2,038 | 85.99% |
▷ Protected methods | 248 | 10.46% |
▷ Private methods | 84 | 3.54% |
Functions | 45 | |
▷ Named functions | 28 | 62.22% |
▷ Anonymous functions | 17 | 37.78% |
Constants | 184 | |
▷ Global constants | 10 | 5.43% |
▷ Class constants | 174 | 94.57% |
▷ Public constants | 174 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
35 PNG files occupy 1.24MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/src/images/timer.png | 1.22KB | 0.97KB | ▼ 20.93% |
admin/src/images/temp1_screenshot.png | 133.12KB | 36.02KB | ▼ 72.94% |
package/lib/datatable/DataTables-1.10.24/images/sort_asc.png | 0.16KB | 0.25KB | 0.00% |
admin/src/images/print_icon.png | 3.84KB | 3.75KB | ▼ 2.44% |
admin/src/images/temp4_screenshot.png | 261.24KB | 79.18KB | ▼ 69.69% |