Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.75MB] [CPU: ▼8.93ms] Passed 4 tests
A check of server-side resources used by PDF & Print by BestWebSoft - WordPress Posts and Pages PDF Generator Plugin
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.08 ▲1.62 | 53.20 ▲13.29 |
Dashboard /wp-admin | 4.42 ▲1.07 | 54.39 ▼5.54 |
Posts /wp-admin/edit.php | 4.47 ▲1.11 | 55.14 ▲9.16 |
Add New Post /wp-admin/post-new.php | 5.64 ▼0.25 | 49.18 ▼52.61 |
Media Library /wp-admin/upload.php | 4.28 ▲1.05 | 45.30 ▲13.31 |
Server storage [IO: ▲28.04MB] [DB: ▲0.07MB] 67% from 3 tests
Input-output and database impact of this plugin
Just a few items left to fix
- The filesystem usage should be lower than 25MB (currently using 28.04MB)
Filesystem: 703 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
bstwbsftwppdtplgns_options |
theysaidso_admin_options |
widget_pdfprnt_buttons |
pdfprnt_options |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by PDF & Print by BestWebSoft - WordPress Posts and Pages PDF Generator Plugin
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,916 ▲169 | 14.34 ▼0.01 | 1.59 ▼0.13 | 37.34 ▼6.87 |
Dashboard /wp-admin | 2,309 ▲128 | 5.62 ▼0.11 | 97.93 ▼14.45 | 43.49 ▲0.13 |
Posts /wp-admin/edit.php | 2,227 ▲127 | 2.19 ▲0.19 | 39.75 ▲1.49 | 36.00 ▲2.39 |
Add New Post /wp-admin/post-new.php | 1,643 ▲117 | 23.40 ▲0.45 | 690.82 ▲105.40 | 61.72 ▲18.89 |
Media Library /wp-admin/upload.php | 1,517 ▲117 | 4.20 ▲0.03 | 96.02 ▲0.37 | 42.90 ▲1.03 |
Headers & Footers /wp-admin/pdf-print-templates.php | 26 | 0.41 | 0.12 | 16.68 |
Settings /wp-admin/pdf-print.php | 26 | 0.41 | 0.07 | 6.82 |
BWS Panel /wp-admin/pdf-print.php?page=pdfprnt-bws-panel | 26 | 0.41 | 0.08 | 5.69 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% 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 cannot be uninstalled
- > Warning in wp-content/plugins/pdf-print/pdf-print.php+2004
array_key_exists(): The first argument should be either a string or an integer
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 5× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/pdf-print/mpdf/compress.php
- > /wp-content/plugins/pdf-print/mpdf/utils/image_details.php
- > /wp-content/plugins/pdf-print/mpdf/qrcode/image.php
- > /wp-content/plugins/pdf-print/mpdf/qrcode/index.php
- > /wp-content/plugins/pdf-print/mpdf/utils/index.php
- 50× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Warning
include_once(): Failed opening '_JPGRAPH_PATHjpgraph_line.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pdf-print/mpdf/graph.php on line 24
- > PHP Warning
Use of undefined constant _JPGRAPH_PATH - assumed '_JPGRAPH_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pdf-print/mpdf/graph.php on line 23
- > PHP Fatal error
Uncaught MpdfException: mPDF Error - cannot find TTF TrueType font file - wp-content/plugins/pdf-print/mpdf/ttfonts/DejaVuSerifCondensed.ttf in /var/www/wordpress/wp-content/plugins/pdf-print/mpdf/mpdf.php:3843
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/pdf-print/mpdf/config.php:4
- > PHP Warning
include_once(_JPGRAPH_PATHjpgraph_bar.php): failed to open stream: No such file or directory in wp-content/plugins/pdf-print/mpdf/graph.php on line 30
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pdf-print/bws_menu/class-bws-settings.php:1452
- > PHP Fatal error
Uncaught Error: Class 'UCDN' not found in wp-content/plugins/pdf-print/mpdf/config_script2lang.php:5
- > PHP Fatal error
Uncaught Error: Class 'FPDF' not found in wp-content/plugins/pdf-print/mpdf/vendor/setasign/fpdi/fpdi_bridge.php:23
- > PHP Warning
Use of undefined constant _JPGRAPH_PATH - assumed '_JPGRAPH_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pdf-print/mpdf/graph.php on line 27
- > PHP Warning
include_once(_JPGRAPH_PATHjpgraph.php): failed to open stream: No such file or directory in wp-content/plugins/pdf-print/mpdf/graph.php on line 23
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
- > GET request to /wp-admin/pdf-print-templates.php
- > Network (severe)
wp-admin/pdf-print-templates.php - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/pdf-print.php
- > Network (severe)
wp-admin/pdf-print.php - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/pdf-print.php?page=pdfprnt-bws-panel
- > Network (severe)
wp-admin/pdf-print.php?page=pdfprnt-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Displaying PDF&Print buttons in the post on your WordPress website.), #2 (Displaying PDF&Print buttons on archive page of your WordPress website.), #3 (Displaying PDF&Print buttons in widget.), #4 (Printing output page example.), #5 (PDF output page example.), #6 (Settings page (Settings tab) for the PDF&Print in admin panel.), #7 (Settings page (Output tab) for the PDF&Print in admin panel.)
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
pdf-print/pdf-print.php Passed 13 tests
The main PHP script in "PDF & Print by BestWebSoft - WordPress Posts and Pages PDF Generator Plugin" version 2.3.4 is automatically included on every request by WordPress
107 characters long description:
Generate PDF files and print WordPress posts/pages. Customize document header/footer styles and appearance.
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin127,609 lines of code in 188 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 138 | 7,688 | 9,700 | 79,294 |
JavaScript | 11 | 4,419 | 5,115 | 24,276 |
PO File | 16 | 7,415 | 13,398 | 17,408 |
CSS | 16 | 254 | 298 | 6,335 |
SVG | 4 | 0 | 0 | 150 |
JSON | 2 | 0 | 0 | 83 |
Markdown | 1 | 24 | 0 | 63 |
PHP code 0% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 8,315)
- Method cyclomatic complexity should be reduced to less than 100 (currently 1,542)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.53 |
Average class complexity | 397.76 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 8,315.00 |
Average method complexity | 20.72 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1,542.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 45 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 45 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 905 | |
▷ Static methods | 69 | 7.62% |
▷ Public methods | 846 | 93.48% |
▷ Protected methods | 46 | 5.08% |
▷ Private methods | 13 | 1.44% |
Functions | 136 | |
▷ Named functions | 136 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 379 | |
▷ Global constants | 55 | 14.51% |
▷ Class constants | 324 | 85.49% |
▷ Public constants | 324 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
71 PNG files occupy 5.24MB with 2.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_888888_256x240.png | 6.94KB | 4.18KB | ▼ 39.78% |
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.32KB | 0.21KB | ▼ 34.34% |
bws_menu/icons/themes/renty.png | 657.95KB | 198.11KB | ▼ 69.89% |
screenshot-2.png | 360.89KB | 149.33KB | ▼ 58.62% |
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_cd0a0a_256x240.png | 4.49KB | 4.20KB | ▼ 6.46% |