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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.07MB] [CPU: ▼4.00ms] Passed 4 tests
Server-side resources used by WP Random Button
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.10 | 41.80 ▲0.27 |
Dashboard /wp-admin | 3.38 ▲0.07 | 45.11 ▼8.92 |
Posts /wp-admin/edit.php | 3.43 ▲0.07 | 48.48 ▼3.83 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 92.61 ▼3.53 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 36.96 ▲0.86 |
Server storage [IO: ▲0.26MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_random-button |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
WP Random Button: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,891 ▲145 | 14.04 ▼0.34 | 5.83 ▲3.99 | 38.00 ▼8.07 |
Dashboard /wp-admin | 2,206 ▲18 | 5.86 ▲0.98 | 106.20 ▼10.91 | 39.19 ▼7.72 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.98 ▼0.07 | 41.41 ▲4.36 | 35.53 ▲1.36 |
Add New Post /wp-admin/post-new.php | 1,543 ▲10 | 23.15 ▼0.09 | 685.73 ▼8.11 | 68.13 ▲13.43 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.17 ▲0.01 | 106.50 ▼4.84 | 46.84 ▲1.73 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- widget_random-button
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested
SRP Passed 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Screenshots: Please add images for these screenshots: #1 (Button Settings), #2 (Popup appearance), #3 (Buttons in widget)
wp-random-button/wp-random-button.php Passed 13 tests
"WP Random Button" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
97 characters long description:
This plugin allows you to display a random post in a popup window via shortcode or custom widget.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin624 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 68 | 76 | 241 |
CSS | 2 | 6 | 6 | 168 |
JavaScript | 2 | 39 | 35 | 167 |
PO File | 1 | 15 | 15 | 48 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 9.50 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 12.00 |
Average method complexity | 2.70 |
▷ 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 | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 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 | 3 | |
▷ Global constants | 3 | 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
3 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 30.36KB | 15.10KB | ▼ 50.27% |
screenshot-3.png | 87.57KB | 36.30KB | ▼ 58.55% |
screenshot-1.png | 59.29KB | 23.20KB | ▼ 60.87% |