Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/pdf-creator-lite/tcpdf/tcpdf.php+16914
Array and string offset access syntax with curly braces is deprecated
Server metrics [RAM: ▲5.57MB] [CPU: ▼38.91ms] 75% from 4 tests
This is a short check of server-side resources used by PDF Creator Lite
The following require your attention
- Extra RAM: The extra memory usage should kept under 5MB (currently 5.57MB on /wp-admin/tools.php?page=exportAsPDF)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.56 ▲6.10 | 25.42 ▼16.10 |
Dashboard /wp-admin | 9.58 ▲6.24 | 25.99 ▼34.07 |
Posts /wp-admin/edit.php | 9.58 ▲6.23 | 27.12 ▼19.91 |
Add New Post /wp-admin/post-new.php | 9.58 ▲3.70 | 23.41 ▼85.55 |
Media Library /wp-admin/upload.php | 9.58 ▲6.36 | 29.48 ▼7.07 |
PDF Creator /wp-admin/tools.php?page=exportAsPDF | 9.58 | 26.08 |
Server storage [IO: ▲2.05MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for PDF Creator Lite
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,913 ▲167 | 13.58 ▼0.74 | 5.44 ▲3.40 | 39.95 ▼2.08 |
Dashboard /wp-admin | 2,207 ▲19 | 4.83 ▼0.04 | 117.97 ▲5.58 | 42.72 ▲3.10 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.05 ▼0.01 | 36.05 ▼0.43 | 33.72 ▼3.09 |
Add New Post /wp-admin/post-new.php | 1,522 ▲3 | 22.95 ▼0.01 | 613.09 ▼67.67 | 53.61 ▲0.90 |
Media Library /wp-admin/upload.php | 1,392 ▲4 | 4.19 ▼0.03 | 99.47 ▼10.82 | 42.16 ▼5.60 |
PDF Creator /wp-admin/tools.php?page=exportAsPDF | 1,342 | 2.33 | 41.24 | 43.23 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/pdf-creator-lite/tcpdf/tcpdf.php+16914
Array and string offset access syntax with curly braces is deprecated
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 4 occurences, only the last one shown
- > GET request to /wp-admin/tools.php?page=exportAsPDF
- > Deprecated in wp-content/plugins/pdf-creator-lite/tcpdf/include/tcpdf_images.php+310
Array and string offset access syntax with curly braces is deprecated
- > GET request to /wp-admin/tools.php?page=exportAsPDF
- > Warning in wp-content/plugins/pdf-creator-lite/tcpdf/tcpdf.php+17770
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/pdf-creator-lite/tcpdf/tools/tcpdf_addfont.php
- > /wp-content/plugins/pdf-creator-lite/download.php
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/pdf-creator-lite/pdf-creator-lite.php:16
- > PHP Warning
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/pdf-creator-lite/tcpdf/tcpdf.php on line 17770
- > PHP Fatal error
Uncaught Error: Class 'TCPDF' not found in wp-content/plugins/pdf-creator-lite/scripts/extend-class-tcpdf.php:4
- > PHP Warning
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/pdf-creator-lite/tcpdf/tcpdf.php on line 17770
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
- > GET request to /wp-admin/tools.php?page=exportAsPDF
- > Rendering (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% 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
Attributes that need to be fixed:
- Screenshots: Screenshot #3 (The outputted file) image required
pdf-creator-lite/pdf-creator-lite.php Passed 13 tests
"PDF Creator Lite" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
82 characters long description:
Let visitors and admins create PDFs of your site content at the click of a button.
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin49,208 lines of code in 45 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 40 | 1,832 | 12,111 | 47,039 |
JavaScript | 3 | 308 | 188 | 1,674 |
CSS | 1 | 42 | 28 | 455 |
JSON | 1 | 0 | 0 | 40 |
PHP code 0% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,296)
- Please reduce cyclomatic complexity of methods to less than 100 (currently 496)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 443.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,296.00 |
Average method complexity | 10.48 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 496.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 15 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 700 | |
▷ Static methods | 106 | 15.14% |
▷ Public methods | 423 | 60.43% |
▷ Protected methods | 277 | 39.57% |
▷ Private methods | 0 | 0.00% |
Functions | 24 | |
▷ Named functions | 22 | 91.67% |
▷ Anonymous functions | 2 | 8.33% |
Constants | 106 | |
▷ Global constants | 106 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/pdf_icons/pdf_icon12.png | 0.46KB | 0.32KB | ▼ 29.36% |
images/pdf_icons/pdf_icon07.png | 4.73KB | 2.65KB | ▼ 43.85% |
images/pdf_icons/pdf_icon06.png | 4.17KB | 2.63KB | ▼ 36.90% |
images/pdf_icons/pdf_icon02.png | 3.21KB | 2.04KB | ▼ 36.50% |
images/pdf_icons/pdf_icon08.png | 5.32KB | 2.67KB | ▼ 49.77% |