Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.07MB] [CPU: ▼298.23ms] Passed 4 tests
A check of server-side resources used by Advanced PDF Generator
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.05 | 52.48 ▲1.13 |
Dashboard /wp-admin | 3.49 ▲0.09 | 32.29 ▼2.41 |
Posts /wp-admin/edit.php | 3.70 ▲0.06 | 37.36 ▲0.97 |
Add New Post /wp-admin/post-new.php | 7.28 ▲0.32 | 85.10 ▼1,188.64 |
Media Library /wp-admin/upload.php | 3.38 ▲0.09 | 21.03 ▼2.85 |
Server storage [IO: ▲9.04MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 152 new files
Database: 1 new table, no new options
New tables |
---|
wp_apdfg_values |
Browser metrics Passed 4 tests
Checking browser requirements for Advanced PDF Generator
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,937 ▲193 | 16.41 ▲0.39 | 10.42 ▲3.72 | 3.15 ▲0.70 |
Dashboard /wp-admin | 2,916 ▲58 | 6.29 ▲0.13 | 117.18 ▼17.97 | 159.10 ▼4.82 |
Posts /wp-admin/edit.php | 2,715 ▲21 | 3.24 ▲0.00 | 70.49 ▲6.95 | 142.31 ▼2.10 |
Add New Post /wp-admin/post-new.php | 1,678 ▲18 | 16.48 ▲0.44 | 411.69 ▼7.19 | 151.09 ▼4.82 |
Media Library /wp-admin/upload.php | 1,723 ▲25 | 5.53 ▲0.01 | 145.21 ▼5.09 | 186.52 ▲4.48 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_apdfg_values
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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/advanced-pdf-generator/public/partials/plugin-name-public-display.php
- 86× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\Block' not found in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/src/FrameDecorator/TableCell.php:19
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Renderer\\AbstractRenderer' not found in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/src/Renderer/ListBullet.php:23
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/src/FrameReflower/ListBullet.php:18
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/src/FrameDecorator/Inline.php:22
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/src/FrameReflower/NullFrameReflower.php:19
- > PHP Warning
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/lib/Cpdf.php on line 488
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/src/Positioner/Block.php:19
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/advanced-pdf-generator/public/libs/dompdf/src/FrameDecorator/Page.php:24
- > PHP Notice
Undefined variable: values in wp-content/plugins/advanced-pdf-generator/admin/partials/advanced-pdf-generator-admin-display.php on line 38
- > PHP Notice
Undefined variable: values in wp-content/plugins/advanced-pdf-generator/admin/partials/advanced-pdf-generator-admin-display.php on line 21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% 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: No descriptions were found for these screenshots #1, #2, #3 in advanced-pdf-generator/assets to your readme.txt
advanced-pdf-generator/advanced-pdf-generator.php 92% from 13 tests
The entry point to "Advanced PDF Generator" version 0.4.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin23,012 lines of code in 102 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 91 | 5,642 | 13,163 | 22,157 |
CSS | 3 | 95 | 52 | 430 |
Markdown | 3 | 91 | 0 | 218 |
XML | 1 | 0 | 2 | 140 |
JSON | 1 | 0 | 0 | 44 |
HTML | 1 | 0 | 0 | 17 |
JavaScript | 2 | 4 | 54 | 6 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.47 |
Average class complexity | 54.37 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 765.00 |
Average method complexity | 5.07 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 10 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 83 | |
▷ Abstract classes | 4 | 4.82% |
▷ Concrete classes | 79 | 95.18% |
▷ Final classes | 0 | 0.00% |
Methods | 1,130 | |
▷ Static methods | 62 | 5.49% |
▷ Public methods | 955 | 84.51% |
▷ Protected methods | 122 | 10.80% |
▷ Private methods | 53 | 4.69% |
Functions | 11 | |
▷ Named functions | 3 | 27.27% |
▷ Anonymous functions | 8 | 72.73% |
Constants | 84 | |
▷ Global constants | 3 | 3.57% |
▷ Class constants | 81 | 96.43% |
▷ Public constants | 81 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and 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 |
public/libs/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |