Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.16MB] [CPU: ▼22.54ms] Passed 4 tests
Analyzing server-side resources used by WP Advanced PDF
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.84 ▲0.38 | 42.76 ▼0.50 |
Dashboard /wp-admin | 3.51 ▲0.16 | 32.45 ▼33.45 |
Posts /wp-admin/edit.php | 3.59 ▲0.23 | 37.27 ▼18.58 |
Add New Post /wp-admin/post-new.php | 5.82 ▼0.07 | 74.42 ▼33.17 |
Media Library /wp-admin/upload.php | 3.53 ▲0.30 | 33.65 ▼4.97 |
WP Advanced PDF /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php | 3.49 | 29.28 |
Server storage [IO: ▲28.01MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
These are issues you should consider
- Total filesystem usage should be limited to 25MB (currently using 28.01MB)
Filesystem: 401 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_ExporttoPDFRecord |
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
Export_db_version |
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
ptpdf |
Browser metrics Passed 4 tests
Checking browser requirements for WP Advanced PDF
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,930 ▲184 | 13.90 ▼0.49 | 6.27 ▲4.44 | 44.72 ▲1.11 |
Dashboard /wp-admin | 2,217 ▲29 | 5.28 ▼0.58 | 112.75 ▲5.25 | 40.32 ▲1.34 |
Posts /wp-admin/edit.php | 2,098 ▲6 | 2.41 ▲0.42 | 42.16 ▲1.38 | 35.51 ▼0.54 |
Add New Post /wp-admin/post-new.php | 1,528 ▼5 | 22.22 ▼1.06 | 684.73 ▲69.46 | 61.91 ▲1.04 |
Media Library /wp-admin/upload.php | 1,412 ▲30 | 4.63 ▲0.43 | 102.58 ▼2.17 | 43.85 ▼0.25 |
WP Advanced PDF /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php | 4,122 | 2.30 | 45.50 | 49.63 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_ExporttoPDFRecord
- This plugin does not fully uninstall, leaving 8 options in the database
- Export_db_version
- ptpdf
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+362
Undefined index: availability
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+398
Undefined index: cache_updation_sch
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+409
Undefined index: ced_file_name
- 8 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+423
Undefined index: authorDetail
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+520
Undefined index: link_button
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+704
Undefined index: page_header
- 4 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+872
Undefined index: footer_align
- 14 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-advanced-pdf/wp-advanced-pdf.php
- > Notice in wp-content/plugins/wp-advanced-pdf/libs/wpppdf-tab-general.php+909
Undefined index: water_font
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 take a closer look at the following
- 83× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_013.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/barcodes/example_2d_qrcode_svg.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_012.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_039.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_028.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_036.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_024.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/tools/tcpdf_addfont.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/barcodes/example_2d_qrcode_png.php
- > /wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_054.php
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
require_once(wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_066.php on line 20
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/example_066.php on line 20
- > PHP Fatal error
Uncaught Error: Call to undefined function bcadd() in wp-content/plugins/wp-advanced-pdf/tcpdf_min/tcpdf_barcodes_1d.php:2080
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Tags: Please delete some tags, you are using 11 tag instead of maximum 10
wp-advanced-pdf/wp-advanced-pdf.php 92% from 13 tests
The primary PHP file in "WP Advanced PDF" version 1.1.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Description: Keep the plugin description shorter than 140 characters (currently 188 characters long)
Code Analysis 0% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please make sure to remedy the following
- Do not include executable or dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/wp-advanced-pdf/tcpdf_min/examples/data/cert/tcpdf.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 234 | 4,457 | 18,246 | 56,317 |
SVG | 3 | 1 | 1 | 1,882 |
JavaScript | 3 | 44 | 47 | 364 |
PO File | 1 | 147 | 150 | 349 |
CSS | 3 | 6 | 4 | 234 |
Markdown | 1 | 21 | 0 | 63 |
JSON | 1 | 0 | 0 | 47 |
PHP code 0% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,413)
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 502)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 305.58 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,413.00 |
Average method complexity | 9.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 502.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 24 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 24 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 843 | |
▷ Static methods | 111 | 13.17% |
▷ Public methods | 549 | 65.12% |
▷ Protected methods | 294 | 34.88% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 165 | |
▷ Global constants | 165 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.65MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
tcpdf_min/examples/images/image_with_alpha.png | 238.49KB | 61.71KB | ▼ 74.12% |
tcpdf_min/examples/images/img.png | 190.57KB | 64.69KB | ▼ 66.06% |
tcpdf_min/examples/images/logo_example.png | 18.96KB | 17.68KB | ▼ 6.71% |
asset/images/pdf.png | 7.22KB | 3.39KB | ▼ 53.05% |
asset/images/Windows-error.png | 19.72KB | 11.92KB | ▼ 39.54% |