10% random-posts-with-thumbnails

Code Review | Random Posts with Thumbnails

WordPress plugin Random Posts with Thumbnails scored 10% from 54 tests.

About plugin

  • Plugin page: random-posts-with...
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2012
  • Latest release: Oct 5, 2012
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: wondermill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 6,445 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/random-posts-with-thumbnails/random-posts-with-thumbnails.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; RandomPostsWithThumbnails_Widget has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼54.04ms] Passed 4 tests

Server-side resources used by Random Posts with Thumbnails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.16 ▼46.72
Dashboard /wp-admin2.12 ▼1.187.47 ▼41.95
Posts /wp-admin/edit.php2.12 ▼1.234.96 ▼45.26
Add New Post /wp-admin/post-new.php2.12 ▼3.766.18 ▼82.21
Media Library /wp-admin/upload.php2.12 ▼1.105.62 ▼27.31

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_randompostswiththumbnails_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Random Posts with Thumbnails
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.22 ▼1.332.15 ▲0.1538.67 ▼10.47
Dashboard /wp-admin2,209 ▲214.85 ▼0.05106.03 ▼15.2839.29 ▼10.03
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0633.58 ▼3.5432.83 ▼1.59
Add New Post /wp-admin/post-new.php1,542 ▲2518.14 ▲0.56610.68 ▼45.3652.04 ▲2.04
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0096.31 ▲2.4244.21 ▲1.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/random-posts-with-thumbnails/random-posts-with-thumbnails.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; RandomPostsWithThumbnails_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_randompostswiththumbnails_widget
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/random-posts-with-thumbnails/random-posts-with-thumbnails.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: random, posts, thumbnails

random-posts-with-thumbnails/random-posts-with-thumbnails.php 85% from 13 tests

The entry point to "Random Posts with Thumbnails" version 1... is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1...")
  • Description: Please don't use more than 140 characters for the plugin description (currently 225 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected112 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12411112

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity6.75
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected