Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▼0.91MB] [CPU: ▼174.59ms] Passed 4 tests
Server-side resources used by Blog as PDF
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.01 | 34.16 ▲7.16 |
Dashboard /wp-admin | 2.74 ▼0.31 | 19.95 ▼29.42 |
Posts /wp-admin/edit.php | 2.74 ▼0.36 | 21.51 ▼21.22 |
Add New Post /wp-admin/post-new.php | 2.74 ▼2.69 | 24.26 ▼634.62 |
Media Library /wp-admin/upload.php | 2.74 ▼0.26 | 20.01 ▼13.10 |
Blog as PDF /wp-admin/options-general.php?page=blog-as-pdf/blog-as-pdf.php | 2.74 | 22.00 |
Server storage [IO: ▲30.69MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
- Try to limit filesystem usage to 25MB (currently using 30.69MB)
Filesystem: 390 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by Blog as PDF
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,684 ▲88 | 15.98 ▲0.35 | 9.86 ▼0.54 | 50.11 ▲3.78 |
Dashboard /wp-admin | 2,978 ▲41 | 5.94 ▼0.07 | 148.44 ▼0.89 | 106.89 ▲3.40 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.72 ▼0.01 | 63.69 ▼4.34 | 87.79 ▼6.98 |
Add New Post /wp-admin/post-new.php | 1,503 ▲5 | 18.59 ▼0.23 | 374.14 ▼48.74 | 104.72 ▼2.54 |
Media Library /wp-admin/upload.php | 1,812 ▲5 | 5.06 ▲0.06 | 150.54 ▼1.70 | 117.67 ▲7.29 |
Blog as PDF /wp-admin/options-general.php?page=blog-as-pdf/blog-as-pdf.php | 1,070 | 2.06 | 54.88 | 79.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin cannot be uninstalled
- > User deprecated in wp-includes/functions.php+5495
has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
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
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=blog-as-pdf/blog-as-pdf.php
- > User deprecated in wp-includes/functions.php+5495
has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 83× PHP files output text when accessed directly (only 10 are shown):
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/example_061.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/example_055.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/barcodes/example_2d_datamatrix_png.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/example_002.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/example_062.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/example_028.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/barcodes/example_2d_qrcode_svgi.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/example_046.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/example_033.php
- > /wp-content/plugins/blog-as-pdf/tcpdf/examples/barcodes/example_1d_svg.php
- 84× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
chr() expects parameter 1 to be int, string given in wp-content/plugins/blog-as-pdf/tcpdf/include/tcpdf_fonts.php on line 1671
- > PHP Notice
Trying to access array offset on value of type int in wp-content/plugins/blog-as-pdf/tcpdf/tcpdf.php on line 4701
- > PHP Warning
chr() expects parameter 1 to be int, string given in wp-content/plugins/blog-as-pdf/tcpdf/include/tcpdf_fonts.php on line 1671
- > PHP Warning
chr() expects parameter 1 to be int, string given in wp-content/plugins/blog-as-pdf/tcpdf/include/tcpdf_fonts.php on line 1671
- > PHP Notice
Trying to access array offset on value of type int in wp-content/plugins/blog-as-pdf/tcpdf/tcpdf.php on line 12327
- > PHP Warning
chr() expects parameter 1 to be int, string given in wp-content/plugins/blog-as-pdf/tcpdf/include/tcpdf_fonts.php on line 1671
- > PHP Warning
chr() expects parameter 1 to be int, string given in wp-content/plugins/blog-as-pdf/tcpdf/include/tcpdf_fonts.php on line 1671
- > PHP Warning
chr() expects parameter 1 to be int, string given in wp-content/plugins/blog-as-pdf/tcpdf/include/tcpdf_fonts.php on line 1671
- > PHP Warning
chr() expects parameter 1 to be int, string given in wp-content/plugins/blog-as-pdf/tcpdf/include/tcpdf_fonts.php on line 1671
- > PHP Notice
Trying to access array offset on value of type int in wp-content/plugins/blog-as-pdf/tcpdf/tcpdf.php on line 4701
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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
3 plugin tags: ebook, posts, pdf
blog-as-pdf/blog-as-pdf.php Passed 13 tests
Analyzing the main PHP file in "Blog as PDF" version 1.2
57 characters long description:
Export posts from your wordpress blog as PDF. Choose some
Code Analysis 0% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
These items require your attention
- You should never include executable (binary) or otherwise dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/blog-as-pdf/tcpdf/examples/data/cert/tcpdf.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 229 | 3,952 | 17,594 | 51,524 |
SVG | 3 | 1 | 1 | 1,882 |
Markdown | 1 | 21 | 0 | 63 |
JSON | 1 | 0 | 0 | 47 |
PHP code 0% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,368)
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 502)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 322.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,368.00 |
Average method complexity | 10.03 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 502.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 20 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 712 | |
▷ Static methods | 109 | 15.31% |
▷ Public methods | 436 | 61.24% |
▷ Protected methods | 276 | 38.76% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 138 | |
▷ Global constants | 138 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.58MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
tcpdf/examples/images/img.png | 190.57KB | 64.69KB | ▼ 66.06% |
images/error.png | 0.68KB | 0.72KB | 0.00% |
tcpdf/examples/images/_blank.png | 0.13KB | 0.09KB | ▼ 30.66% |
tcpdf/examples/images/alpha.png | 23.33KB | 30.34KB | 0.00% |
images/twitter.png | 14.50KB | 5.94KB | ▼ 59.07% |