Benchmarks
Plugin footprint 83% 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.23MB] [CPU: ▼2.22ms] Passed 4 tests
This is a short check of server-side resources used by Print, PDF, Email by PrintFriendly
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.68 ▲0.22 | 41.50 ▲1.59 |
Dashboard /wp-admin | 3.54 ▲0.23 | 51.86 ▼9.19 |
Posts /wp-admin/edit.php | 3.66 ▲0.29 | 49.69 ▲3.46 |
Add New Post /wp-admin/post-new.php | 6.12 ▲0.23 | 94.59 ▼0.45 |
Media Library /wp-admin/upload.php | 3.46 ▲0.23 | 34.37 ▼0.81 |
Print Friendly & PDF /wp-admin/options-general.php?page=printfriendly | 3.80 | 35.47 |
Server storage [IO: ▲0.54MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options |
---|
printfriendly_option |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by Print, PDF, Email by PrintFriendly
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,872 ▲111 | 13.35 ▼1.02 | 7.73 ▲5.67 | 42.47 ▼2.66 |
Dashboard /wp-admin | 2,199 ▲19 | 5.62 ▲0.07 | 81.88 ▼8.33 | 42.55 ▲4.97 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.00 ▼0.01 | 39.86 ▼0.21 | 38.26 ▼3.08 |
Add New Post /wp-admin/post-new.php | 1,539 ▲11 | 18.36 ▼4.69 | 609.92 ▲3.17 | 66.30 ▲6.50 |
Media Library /wp-admin/upload.php | 1,398 ▲1 | 4.28 ▲0.07 | 97.09 ▼7.65 | 41.18 ▼3.71 |
Print Friendly & PDF /wp-admin/options-general.php?page=printfriendly | 2,645 | 5.29 | 110.68 | 146.97 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
Smoke tests 50% 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 errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=printfriendly
- > Notice in wp-content/plugins/printfriendly/views/tabs.php+84
Undefined index: pf_algo_css_content
- > GET request to /wp-admin/options-general.php?page=printfriendly
- > Notice in wp-content/plugins/printfriendly/views/tabs.php+286
Undefined index: content_position_css
SRP 50% 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
Almost there! Just fix the following items
- 5× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/printfriendly/views/tabs.php:4
- > PHP Warning
Use of undefined constant PRINTFRIENDLY_BASEURL - assumed 'PRINTFRIENDLY_BASEURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/printfriendly/views/settings.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/printfriendly/views/settings.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/printfriendly/pf.php:106
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/printfriendly/views/pro.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: email, print plugin, woocommerce print, print, pdf plugin...
printfriendly/pf.php 92% from 13 tests
"Print, PDF, Email by PrintFriendly" version 5.5.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("printfriendly.php" instead of "pf.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,594 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 310 | 450 | 1,863 |
JavaScript | 4 | 76 | 24 | 418 |
CSS | 3 | 66 | 7 | 308 |
JSON | 1 | 0 | 0 | 5 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 228.00 |
▷ Minimum class complexity | 228.00 |
▷ Maximum class complexity | 228.00 |
Average method complexity | 5.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 74.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 53 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 50 | 94.34% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 5.66% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/pf-icon.png | 1.26KB | 0.87KB | ▼ 31.35% |