Benchmarks
Plugin footprint Passed 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.05MB] [CPU: ▼295.75ms] Passed 4 tests
Server-side resources used by PDF or image generator
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.13 | 69.81 ▲11.84 |
Dashboard /wp-admin | 3.49 ▲0.08 | 35.10 ▲0.54 |
Posts /wp-admin/edit.php | 3.71 ▲0.07 | 39.62 ▲1.37 |
Add New Post /wp-admin/post-new.php | 6.95 ▼0.02 | 96.34 ▼1,188.44 |
Media Library /wp-admin/upload.php | 3.37 ▲0.07 | 27.90 ▲3.52 |
PDF or image generator settings /wp-admin/options-general.php?page=PDF-image-settings | 3.39 | 27.21 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
PDF or image generator: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,790 ▲33 | 15.93 ▲0.16 | 5.68 ▼0.42 | 2.41 ▼0.11 |
Dashboard /wp-admin | 2,890 ▲36 | 6.17 ▼0.02 | 132.11 ▼13.10 | 212.12 ▲48.51 |
Posts /wp-admin/edit.php | 2,696 ▲11 | 3.24 ▲0.01 | 64.85 ▲1.63 | 140.44 ▼9.27 |
Add New Post /wp-admin/post-new.php | 1,763 ▲102 | 22.94 ▲7.32 | 431.18 ▼72.69 | 203.33 ▲17.87 |
Media Library /wp-admin/upload.php | 1,700 ▲5 | 5.51 ▼0.05 | 134.91 ▼25.98 | 213.25 ▼22.96 |
PDF or image generator settings /wp-admin/options-general.php?page=PDF-image-settings | 1,206 | 2.44 | 56.66 | 144.57 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/pdf-or-image-generator/templates/admin/PDF-image-settings.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/pdf-or-image-generator/PDF-image-generator.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/pdf-or-image-generator/templates/admin/PDFIG-admin-demo-template.php:26
- > PHP Fatal error
Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/pdf-or-image-generator/templates/PDFIG-demo-template.php:23
- > 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 Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: html to pdf, image converter, html to image, pdf converter, converter
pdf-or-image-generator/PDF-image-generator.php 85% from 13 tests
Analyzing the main PHP file in "PDF or image generator" version 1.0
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("pdf-or-image-generator.php" instead of "PDF-image-generator.php")
- Text Domain: The text domain should only use lowercase characters and dashes
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 detected576 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 80 | 114 | 468 |
PO File | 1 | 23 | 0 | 73 |
Markdown | 1 | 24 | 0 | 35 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 21.00 |
▷ Minimum class complexity | 17.00 |
▷ Maximum class complexity | 25.00 |
Average method complexity | 2.82 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 22 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 14 | 63.64% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 8 | 36.36% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 5 | 55.56% |
▷ Class constants | 4 | 44.44% |
▷ Public constants | 4 | 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.21MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/pdf-image-generator-settings.png | 215.81KB | 62.51KB | ▼ 71.03% |