Benchmarks
Plugin footprint 57% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- Install procedure had errors
- > Compile error in wp-content/plugins/pdf-creator/MPDF/mpdf.php+1422
Switch statements may only contain one default clause
Server metrics [RAM: ▲0.00MB] [CPU: ▼4.98ms] Passed 4 tests
Server-side resources used by PDF-Creator
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 38.45 ▲1.59 |
Dashboard /wp-admin | 3.31 ▲0.01 | 47.07 ▲0.57 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 44.90 ▼4.84 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 77.11 ▼17.22 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.64 ▲4.28 |
Server storage [IO: ▲30.15MB] [DB: ▲0.00MB] 67% from 3 tests
How much does this plugin use your filesystem and database?
These are issues you should consider
- Filesystem usage must be lower than 25MB (currently using 30.15MB)
Filesystem: 262 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for PDF-Creator
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 14.80 ▲0.42 | 1.80 ▲0.18 | 43.83 ▲0.14 |
Dashboard /wp-admin | 2,206 ▲31 | 5.90 ▲0.95 | 101.46 ▼9.89 | 41.59 ▲0.20 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.01 ▲0.04 | 34.02 ▼7.68 | 34.51 ▼0.39 |
Add New Post /wp-admin/post-new.php | 1,514 ▼19 | 17.58 ▼5.63 | 664.77 ▲32.05 | 62.33 ▲7.63 |
Media Library /wp-admin/upload.php | 1,385 ▼6 | 4.21 ▲0.02 | 107.44 ▲11.52 | 47.41 ▲3.05 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 items
- 5× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/pdf-creator/MPDF/utils/index.php
- > /wp-content/plugins/pdf-creator/MPDF/examples/formsubmit.php
- > /wp-content/plugins/pdf-creator/MPDF/compress.php
- > /wp-content/plugins/pdf-creator/MPDF/examples/show_code.php
- > /wp-content/plugins/pdf-creator/MPDF/examples/index.php
- 115× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
include_once(): Failed opening '_JPGRAPH_PATHjpgraph_log.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/pdf-creator/MPDF/graph.php on line 26
- > PHP Fatal error
Switch statements may only contain one default clause in wp-content/plugins/pdf-creator/MPDF/mpdf.php on line 1422
- > PHP Fatal error
Switch statements may only contain one default clause in wp-content/plugins/pdf-creator/MPDF/mpdf.php on line 1422
- > PHP Fatal error
Switch statements may only contain one default clause in wp-content/plugins/pdf-creator/MPDF/mpdf.php on line 1422
- > 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-creator/MPDF/graph.php on line 26
- > PHP Fatal error
Switch statements may only contain one default clause in wp-content/plugins/pdf-creator/MPDF/mpdf.php on line 1422
- > PHP Fatal error
Switch statements may only contain one default clause in wp-content/plugins/pdf-creator/MPDF/mpdf.php on line 1422
- > PHP Fatal error
Switch statements may only contain one default clause in wp-content/plugins/pdf-creator/MPDF/mpdf.php on line 1422
- > PHP Warning
Use of undefined constant _MPDF_PATH - assumed '_MPDF_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pdf-creator/MPDF/graph.php on line 13
- > PHP Fatal error
Switch statements may only contain one default clause in wp-content/plugins/pdf-creator/MPDF/mpdf.php on line 1422
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: creator, pdf
pdf-creator/pdf-creator.php Passed 13 tests
The principal PHP file in "PDF-Creator" v. 0.3 is loaded by WordPress automatically on each request
26 characters long description:
Plugin to create PDF files
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin81,111 lines of code in 143 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 135 | 8,647 | 5,715 | 78,521 |
SVG | 2 | 0 | 0 | 2,213 |
CSS | 5 | 57 | 20 | 345 |
HTML | 1 | 4 | 0 | 32 |
PHP code 0% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 9,842)
- Please reduce cyclomatic complexity of methods to less than 100 (currently 1,516)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 465.29 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 9,842.00 |
Average method complexity | 22.07 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1,516.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 28 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 28 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 619 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 598 | 96.61% |
▷ Protected methods | 21 | 3.39% |
▷ Private methods | 0 | 0.00% |
Functions | 21 | |
▷ Named functions | 21 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 57 | |
▷ Global constants | 57 | 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
15 PNG files occupy 0.67MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
MPDF/examples/img3.png | 1.06KB | 0.20KB | ▼ 80.86% |
MPDF/examples/img1.png | 0.98KB | 0.14KB | ▼ 86.10% |
MPDF/examples/tiger.png | 83.21KB | 32.43KB | ▼ 61.03% |
MPDF/examples/alpha3.png | 8.39KB | 3.56KB | ▼ 57.61% |
MPDF/examples/firefox-48.png | 5.51KB | 2.60KB | ▼ 52.77% |