Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Notice in wp-content/plugins/get-first-image-set-as-featured-image/get_first_image_set_as_featured_image.php+102
Undefined index: post
Server metrics [RAM: ▼1.93MB] [CPU: ▼53.67ms] Passed 4 tests
An overview of server-side resources used by Get First Image Set As Featured Image
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.40 | 5.14 ▼35.74 |
Dashboard /wp-admin | 2.08 ▼1.22 | 5.42 ▼46.43 |
Posts /wp-admin/edit.php | 2.08 ▼1.28 | 6.22 ▼45.29 |
Add New Post /wp-admin/post-new.php | 2.08 ▼3.81 | 6.92 ▼87.23 |
Media Library /wp-admin/upload.php | 2.08 ▼1.15 | 6.54 ▼26.66 |
Server storage [IO: ▲0.63MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
Get First Image Set As Featured Image: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲29 | 13.26 ▼1.13 | 1.81 ▼0.12 | 43.74 ▲1.84 |
Dashboard /wp-admin | 2,206 ▲21 | 4.87 ▼0.98 | 98.54 ▼1.36 | 39.72 ▼5.47 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.04 ▼0.01 | 40.56 ▼1.28 | 32.89 ▼7.12 |
Add New Post /wp-admin/post-new.php | 1,514 ▼0 | 17.60 ▼5.88 | 622.10 ▲31.02 | 54.66 ▼12.01 |
Media Library /wp-admin/upload.php | 1,382 ▼6 | 4.17 ▲0.01 | 99.44 ▼19.39 | 44.58 ▼1.95 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/get-first-image-set-as-featured-image/get_first_image_set_as_featured_image.php+102
Undefined index: post
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
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
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post() in wp-content/plugins/get-first-image-set-as-featured-image/get_first_image_set_as_featured_image.php:17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Screenshots: Screenshot #1 (Get Image from content set as featured image automatically) image not found
get-first-image-set-as-featured-image/get_first_image_set_as_featured_image.php 92% from 13 tests
"Get First Image Set As Featured Image" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("get-first-image-set-as-featured-image.php" instead of "get_first_image_set_as_featured_image.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin54 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 23 | 29 | 54 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.63MB with 0.46MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 640.48KB | 169.36KB | ▼ 73.56% |