Random Post for Widget Security & Risk Analysis

wordpress.org/plugins/random-post-for-widget

This simple plugin is a widget that displays a list of random posts on your sidebar. You can exclude certain posts by ID.

2K active installs v5.0 PHP + WP 4.5+ Updated Mar 18, 2023
postsrandomrandom-postrandom-postssimple-plugin
85
A · Safe
CVEs total0
Unpatched0
Last CVENever
Safety Verdict

Is Random Post for Widget Safe to Use in 2026?

Generally Safe

Score 85/100

Random Post for Widget has no known CVEs and is actively maintained. It's a solid choice for most WordPress installations.

No known CVEs Updated 3yr ago
Risk Assessment

The 'random-post-for-widget' plugin version 5.0 exhibits a concerning security posture despite a lack of recorded historical vulnerabilities or complex taint flows. The static analysis reveals a significant weakness: all 16 output instances are not properly escaped. This is a critical oversight that can lead to Cross-Site Scripting (XSS) vulnerabilities, allowing attackers to inject malicious scripts into the website's frontend, potentially compromising user sessions or defacing the site. Additionally, the presence of the `create_function` function is a code smell, as it's considered deprecated and potentially insecure, though its specific impact here isn't immediately clear without further context. The complete absence of capability checks and nonce checks, coupled with zero AJAX handlers and REST API routes that might require such protections, suggests a very limited attack surface, which is positive. However, the unescaped output represents a direct and exploitable risk that outweighs the otherwise clean technical indicators.

Key Concerns

  • Unescaped output found
  • Dangerous function used (create_function)
  • Missing nonce checks
  • Missing capability checks
Vulnerabilities
None known

Random Post for Widget Security Vulnerabilities

No known vulnerabilities — this is a good sign.
Code Analysis
Analyzed Mar 16, 2026

Random Post for Widget Code Analysis

Dangerous Functions
1
Raw SQL Queries
0
0 prepared
Unescaped Output
16
0 escaped
Nonce Checks
0
Capability Checks
0
File Operations
0
External Requests
0
Bundled Libraries
0

Dangerous Functions Found

create_functionadd_action( 'widgets_init', create_function('', 'return register_widget("RandomPostForWidget");') );random_post_widget.php:95

Output Escaping

0% escaped16 total outputs
Attack Surface

Random Post for Widget Attack Surface

Entry Points0
Unprotected0
WordPress Hooks 1
actionwidgets_initrandom_post_widget.php:95
Maintenance & Trust

Random Post for Widget Maintenance & Trust

Maintenance Signals

WordPress version tested6.1.10
Last updatedMar 18, 2023
PHP min version
Downloads18K

Community Trust

Rating94/100
Number of ratings3
Active installs2K
Developer Profile

Random Post for Widget Developer Profile

Shashi Dhar Kumar

3 plugins · 2K total installs

84
trust score
Avg Security Score
85/100
Avg Patch Time
30 days
View full developer profile
Detection Fingerprints

How We Detect Random Post for Widget

Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.

Asset Fingerprints

Asset Paths
/wp-content/plugins/random-post-for-widget/random_post_widget.php

HTML / DOM Fingerprints

CSS Classes
RandomPostForWidget
Data Attributes
id="RandomPostForWidget"name="RandomPostForWidget"
FAQ

Frequently Asked Questions about Random Post for Widget