Safe PHP Code Widget Security & Risk Analysis

wordpress.org/plugins/safe-php-code-widget

Adds a secure and simple widget in which you can use PHP and JavaScript code. Also you can use unfiltered HTML or just Text. Admin Use Only.

70 active installs v1.0 PHP + WP 2.8+ Updated Jan 9, 2019
codehtmljavascriptphpwidget
85
A · Safe
CVEs total0
Unpatched0
Last CVENever
Safety Verdict

Is Safe PHP Code Widget Safe to Use in 2026?

Generally Safe

Score 85/100

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

No known CVEs Updated 7yr ago
Risk Assessment

The 'safe-php-code-widget' plugin, version 1.0, exhibits a mixed security posture. On the positive side, it demonstrates a strong adherence to secure coding practices by avoiding common vulnerabilities like SQL injection and external HTTP requests, and by utilizing prepared statements for all its SQL queries. The absence of known CVEs and a clean vulnerability history further suggest a currently well-maintained or low-risk profile.

However, the static analysis reveals a critical concern: the presence of the `create_function` dangerous function. This function is known to be a significant security risk as it can lead to arbitrary code execution if used with unsanitized input, effectively bypassing many security controls. Although the taint analysis shows zero flows with unsanitized paths, this does not negate the inherent risk of `create_function` itself. Additionally, the extremely low percentage of properly escaped output (14%) indicates a high likelihood of cross-site scripting (XSS) vulnerabilities, particularly if any user-provided data indirectly reaches an output sink without proper sanitization.

In conclusion, while the plugin's overall architecture appears to have a limited attack surface and no publicly known vulnerabilities, the use of `create_function` and the significant lack of output escaping are substantial weaknesses. These issues introduce potential for critical vulnerabilities, especially if the widget is ever exposed to user-controlled input that is not rigorously validated before being passed to `create_function` or rendered in the output.

Key Concerns

  • Use of dangerous function create_function
  • Low percentage of properly escaped output
  • No nonce checks detected
Vulnerabilities
None known

Safe PHP Code Widget Security Vulnerabilities

No known vulnerabilities — this is a good sign.
Version History

Safe PHP Code Widget Release Timeline

No version history available.
Code Analysis
Analyzed Mar 16, 2026

Safe PHP Code Widget Code Analysis

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

Dangerous Functions Found

create_functionadd_action('widgets_init', create_function('', 'return register_widget("Safe_PHP_Code_Widget");'));safe-php-code-widget.php:62

Output Escaping

14% escaped14 total outputs
Attack Surface

Safe PHP Code Widget Attack Surface

Entry Points0
Unprotected0
WordPress Hooks 1
actionwidgets_initsafe-php-code-widget.php:62
Maintenance & Trust

Safe PHP Code Widget Maintenance & Trust

Maintenance Signals

WordPress version tested5.0.25
Last updatedJan 9, 2019
PHP min version
Downloads2K

Community Trust

Rating0/100
Number of ratings0
Active installs70
Developer Profile

Safe PHP Code Widget Developer Profile

k0tik

1 plugin · 70 total installs

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

How We Detect Safe PHP Code Widget

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

Asset Fingerprints

Asset Paths
/wp-content/plugins/safe-php-code-widget/style.css/wp-content/plugins/safe-php-code-widget/execphp.js
Script Paths
/wp-content/plugins/safe-php-code-widget/execphp.js
Version Parameters
safe-php-code-widget/style.css?ver=safe-php-code-widget/execphp.js?ver=

HTML / DOM Fingerprints

CSS Classes
widget_execphpexecphpwidget
Data Attributes
id="safephpcode-title-name="safephpcode-title-id="safephpcode-text-name="safephpcode-text-id="safephpcode-filter-name="safephpcode-filter-
FAQ

Frequently Asked Questions about Safe PHP Code Widget