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
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.06MB] [CPU: ▼4.45ms] Passed 4 tests
Analyzing server-side resources used by Post to Pdf
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 39.55 ▲5.45 |
Dashboard /wp-admin | 3.37 ▲0.03 | 45.11 ▼12.21 |
Posts /wp-admin/edit.php | 3.48 ▲0.13 | 44.66 ▼1.21 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 91.99 ▼8.66 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 35.44 ▲4.29 |
Server storage [IO: ▲10.65MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 337 new files
Database: no new tables, 17 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
gmptp_single_display_location |
gmpcp_show_hide |
gmptp_shop_display_location |
theysaidso_admin_options |
gmpcp_background_color |
gmptp_shop_button_text |
gmpcp_footer_text |
gmpcp_hf_background_color |
... |
Browser metrics Passed 4 tests
Post to Pdf: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,837 ▲91 | 13.80 ▼0.85 | 1.78 ▲0.05 | 37.56 ▼2.41 |
Dashboard /wp-admin | 2,243 ▲57 | 5.16 ▲0.25 | 105.04 ▼3.05 | 40.04 ▼5.21 |
Posts /wp-admin/edit.php | 2,125 ▲36 | 2.34 ▲0.28 | 35.72 ▼1.35 | 32.14 ▲1.41 |
Add New Post /wp-admin/post-new.php | 1,552 ▲19 | 18.59 ▼4.62 | 613.21 ▼23.41 | 35.35 ▼17.55 |
Media Library /wp-admin/upload.php | 1,422 ▲31 | 4.47 ▲0.24 | 101.14 ▲7.06 | 43.82 ▲0.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- The uninstall procedure has failed, leaving 17 options in the database
- gmpcp_show_hide
- db_upgraded
- gmptp_single_button_text
- gmpcp_header_text
- gmpcp_footer_text
- gmpcp_hf_background_color
- gmpcp_background_color
- gmptp_single_display_location
- theysaidso_admin_options
- gmptp_shop_button_text
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
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 task of outputting text when accessed with GET requests:
- > /wp-content/plugins/post-to-pdf/dompdf-master/demo.php
- > /wp-content/plugins/post-to-pdf/dompdf-master/lib/php-css-parser/tests/quickdump.php
- 188× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/post-to-pdf/dompdf-master/lib/fonts/dompdf_font_family_cache.php on line 77
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/post-to-pdf/dompdf-master/src/FrameReflower/Text.php:21
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/post-to-pdf/dompdf-master/lib/fonts/dompdf_font_family_cache.php on line 6
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/post-to-pdf/dompdf-master/lib/fonts/dompdf_font_family_cache.php on line 78
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/post-to-pdf/dompdf-master/lib/fonts/dompdf_font_family_cache.php on line 72
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/post-to-pdf/dompdf-master/src/FrameDecorator/Image.php:20
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/post-to-pdf/dompdf-master/lib/php-svg-lib/tests/Svg/StyleTest.php:15
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/post-to-pdf/dompdf-master/lib/fonts/dompdf_font_family_cache.php on line 21
- > PHP Fatal error
Uncaught Error: Interface 'Dompdf\\Canvas' not found in wp-content/plugins/post-to-pdf/dompdf-master/src/Adapter/GD.php:24
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/post-to-pdf/dompdf-master/lib/php-css-parser/lib/Sabberworm/CSS/Value/CSSString.php:5
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% 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 require attention:
- Screenshots: These screenshots need descriptions #1, #2, #3, #4 in post-to-pdf/assets to your readme.txt
- Contributors: Plugin contributors not specified
post-to-pdf/post-catalog-pdf.php 85% from 13 tests
This is the main PHP file of "Post to Pdf" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("post-to-pdf.php" instead of "post-catalog-pdf.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin53,036 lines of code in 257 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 205 | 8,577 | 15,381 | 51,390 |
CSS | 32 | 135 | 60 | 707 |
Markdown | 4 | 181 | 0 | 707 |
JSON | 4 | 0 | 0 | 91 |
YAML | 4 | 16 | 3 | 63 |
XML | 4 | 3 | 0 | 46 |
HTML | 1 | 0 | 0 | 17 |
SVG | 1 | 0 | 0 | 8 |
JavaScript | 2 | 1 | 0 | 7 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 36.49 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 797.00 |
Average method complexity | 4.37 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 33 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 181 | |
▷ Abstract classes | 12 | 6.63% |
▷ Concrete classes | 169 | 93.37% |
▷ Final classes | 0 | 0.00% |
Methods | 2,026 | |
▷ Static methods | 80 | 3.95% |
▷ Public methods | 1,723 | 85.04% |
▷ Protected methods | 210 | 10.37% |
▷ Private methods | 93 | 4.59% |
Functions | 16 | |
▷ Named functions | 1 | 6.25% |
▷ Anonymous functions | 15 | 93.75% |
Constants | 178 | |
▷ Global constants | 6 | 3.37% |
▷ Class constants | 172 | 96.63% |
▷ Public constants | 172 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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 |
dompdf-master/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |