Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.25MB] [CPU: ▼12.32ms] Passed 4 tests
This is a short check of server-side resources used by Random Posts and Pages Widget
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.69 ▲0.23 | 35.33 ▼5.33 |
Dashboard /wp-admin | 3.57 ▲0.22 | 43.38 ▼18.16 |
Posts /wp-admin/edit.php | 3.61 ▲0.25 | 49.16 ▲1.21 |
Add New Post /wp-admin/post-new.php | 6.25 ▲0.36 | 80.46 ▼22.45 |
Media Library /wp-admin/upload.php | 3.51 ▲0.28 | 29.92 ▼3.33 |
Server storage [IO: ▲0.20MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
widget_random_posts_and_pages |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Random Posts and Pages Widget
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.24 ▼1.13 | 1.66 ▼0.33 | 40.14 ▼15.64 |
Dashboard /wp-admin | 2,206 ▲18 | 5.91 ▲0.03 | 112.61 ▼3.21 | 36.16 ▼9.22 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.00 ▼0.05 | 39.27 ▲2.11 | 34.34 ▲0.30 |
Add New Post /wp-admin/post-new.php | 1,514 ▼28 | 17.75 ▼0.17 | 684.88 ▲60.12 | 65.38 ▲3.71 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.16 ▼0.06 | 96.87 ▼4.67 | 42.21 ▼2.72 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 uninstall procedure has failed, leaving 7 options in the database
- theysaidso_admin_options
- can_compress_scripts
- widget_random_posts_and_pages
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
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)
Good news, no errors were detected
SRP 50% from 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
Please fix the following
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ays-random-posts-and-pages/WordPress_Random_Posts_and_Pages.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: related posts, random posts, random post, random pages, popular posts
ays-random-posts-and-pages/WordPress_Random_Posts_and_Pages.php 92% from 13 tests
The main PHP file in "Random Posts and Pages Widget" ver. 2.5.7 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("ays-random-posts-and-pages.php" instead of "WordPress_Random_Posts_and_Pages.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected4,882 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 2 | 564 | 11 | 3,117 |
PHP | 1 | 93 | 50 | 956 |
JavaScript | 3 | 137 | 45 | 799 |
HTML | 2 | 3 | 0 | 10 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please tend to the following items
- Please reduce cyclomatic complexity of methods to less than 100 (currently 105)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 216.00 |
▷ Minimum class complexity | 216.00 |
▷ Maximum class complexity | 216.00 |
Average method complexity | 54.75 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 105.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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
jscolor/hv.png | 2.80KB | 7.32KB | 0.00% |
jscolor/hs.png | 2.62KB | 7.54KB | 0.00% |
images/wrong.png | 0.52KB | 0.53KB | 0.00% |
images/gallery_img.png | 2.62KB | 2.01KB | ▼ 23.31% |