Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▼0.89MB] [CPU: ▼36.42ms] Passed 4 tests
Server-side resources used by Show_Random_Post
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 29.02 ▼18.18 |
Dashboard /wp-admin | 3.06 ▼0.29 | 24.07 ▼36.94 |
Posts /wp-admin/edit.php | 3.06 ▼0.30 | 26.93 ▼20.62 |
Add New Post /wp-admin/post-new.php | 3.06 ▼2.83 | 27.60 ▼69.92 |
Media Library /wp-admin/upload.php | 3.06 ▼0.17 | 24.26 ▼13.55 |
Show Random Post Options /wp-admin/tools.php?page=showrandompost-plugin | 3.06 | 26.44 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_showrandompost_widget |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Show_Random_Post
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,902 ▲152 | 13.47 ▼0.88 | 9.01 ▲7.28 | 44.87 ▼0.88 |
Dashboard /wp-admin | 2,199 ▲19 | 5.52 ▼0.14 | 84.00 ▼9.18 | 38.45 ▼3.70 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 1.98 ▲0.04 | 36.26 ▼3.10 | 35.59 ▼1.15 |
Add New Post /wp-admin/post-new.php | 1,529 ▲1 | 22.81 ▼0.18 | 657.34 ▼5.34 | 52.78 ▼1.21 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.19 ▼0.04 | 106.28 ▼3.83 | 46.41 ▼0.69 |
Show Random Post Options /wp-admin/tools.php?page=showrandompost-plugin | 780 | 2.02 | 24.56 | 27.23 |
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
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- Zombie WordPress options detected upon uninstall: 7 options
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- widget_showrandompost_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/tools.php?page=showrandompost-plugin
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
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 items
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/show-random-post/lib/widget.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-random-post/lib/functions.php:44
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-random-post/show_random_post.php:28
- > 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)
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #1 (Widgets created), #2 (Drop your widget to the Sidebar of your choice), #3 (Select which categories of post you want to show), #4 (Select the time for the loop), #5 (You can drop how many widgets you want to show with diferent categories), #6 (This is how every widget will load the posts, and will change automatically on the set time)
show-random-post/show_random_post.php 92% from 13 tests
The principal PHP file in "Show_Random_Post" v. 0.1.0 is loaded by WordPress automatically on each request
The following require your attention:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("show-random-post.php" instead of "show_random_post.php")
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
Good job! No executable or dangerous file extensions detected296 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 52 | 34 | 261 |
JavaScript | 1 | 0 | 3 | 35 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 8.50 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 14.00 |
Average method complexity | 3.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.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 | 6 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 15 | |
▷ Named functions | 15 | 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 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 |
img/noimage.png | 4.98KB | 3.65KB | ▼ 26.66% |