Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼13.79ms] Passed 4 tests
Analyzing server-side resources used by Wordpress Random Image
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.01 | 46.49 ▲5.36 |
Dashboard /wp-admin | 3.32 ▼0.03 | 52.29 ▼19.25 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 48.77 ▼4.08 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 85.89 ▼32.81 |
Media Library /wp-admin/upload.php | 3.25 ▲0.01 | 38.62 ▲0.98 |
Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
Wordpress Random Image: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲3 | 14.25 ▼0.35 | 1.62 ▼0.10 | 42.87 ▼1.67 |
Dashboard /wp-admin | 2,198 ▲27 | 5.57 ▲0.04 | 81.73 ▼4.70 | 40.02 ▼5.15 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.12 ▲0.11 | 37.06 ▲0.83 | 33.92 ▼6.29 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 23.55 ▲0.44 | 695.73 ▲27.67 | 52.31 ▼6.66 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.20 ▼0.03 | 97.63 ▼19.82 | 43.20 ▼3.06 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
The following issues need your attention
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
include(WP_PLUGIN_DIR/wordpress-random-image/random-image-class-id.php): failed to open stream: No such file or directory in wp-content/plugins/wordpress-random-image/random-image.php on line 48
- > PHP Warning
include(): Failed opening 'WP_PLUGIN_DIR/wordpress-random-image/random-image-class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wordpress-random-image/random-image.php on line 47
- > PHP Warning
include(WP_PLUGIN_DIR/wordpress-random-image/random-image-class.php): failed to open stream: No such file or directory in wp-content/plugins/wordpress-random-image/random-image.php on line 47
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wordpress-random-image/random-image.php:59
- > PHP Warning
include(): Failed opening 'WP_PLUGIN_DIR/wordpress-random-image/random-image-class-id.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wordpress-random-image/random-image.php on line 48
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wordpress-random-image/random-image.php on line 47
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wordpress-random-image/random-image.php on line 48
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
- Screenshots: These screenshots require images: #1 (Finding Attachment ID), #2 (Default Wordpress Gallery Option ( Images from this Gallery will get displayed Randomly on using the shortcode [random-image])
wordpress-random-image/random-image.php 85% from 13 tests
The main PHP script in "Wordpress Random Image" version 2.0 is automatically included on every request by WordPress
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wordpress-random-image.php" instead of "random-image.php")
- Description: The description should be shorter than 140 characters (currently 154 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin105 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 73 | 55 | 105 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 8.00 |
▷ Minimum class complexity | 8.00 |
▷ Maximum class complexity | 8.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 2 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 2 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 89.44KB | 26.01KB | ▼ 70.92% |
screenshot-2.png | 113.46KB | 50.77KB | ▼ 55.25% |