PluginSift
PluginsThemesCompare
Directory
  • Plugins
  • Themes
  • Compare Plugins
Plugin Comparisons
  • SEO
  • Security
  • Ecommerce
  • Page Builders
  • Caching
  • Backup
  • Forms
  • Analytics
Resources
  • About
  • Contact
  • llms.txt

© 2026 PluginSift. Data sourced from WordPress.org. · [email protected]

  1. Home
  2. Plugins
  3. PHP
  4. PHP Code Widget
PHP Code Widget icon

PHP Code Widget

Like the Text widget, but also allows working PHP code to be inserted.

By Samuel Wood (Otto)·PHP·Free
4.7(61 reviews)
·90K+ active installs·Updated 4 years ago
DownloadVisit HomepageCompare

As of April 2026, PHP Code Widget is a WordPress php plugin with 90K+ active installations and a 4.7/5 rating from 61 reviews. It has been downloaded 994K+ times in total. Requires WordPress 2.8+ and PHP false+. Available on WordPress.org since 2008. Last updated 4 years ago — may have compatibility concerns. Downloads are down 18% this week. Top alternative: WPCode – Insert Headers and Footers +….

4.7/561 reviews
90K+active installs
994K+total downloads
18 yearssince 2008

Overview

The normal Text widget allows you to insert arbitrary Text and/or HTML code. This allows that too, but also parses any PHP code in the text widget and executes it.

This can make it easier to migrate to a widget-based theme. However, this plugin should not be used long term, as anybody with access to edit the widgets on your site will be able to execute arbitrary PHP code.

All PHP code must be enclosed in the standard php opening and closing tags ( <?php and ?> ) for it to be recognized and executed.

Only users with the unfiltered_html role will be allowed to insert unfiltered HTML. This includes PHP code, so users without admin or editor permissions will not be able to use this to execute code, even if they have widget editing permissions.

Read full description on WordPress.org

Screenshots

Ratings & Reviews

4.761 reviews
5 ★
52
4 ★
5
3 ★
1
2 ★
0
1 ★
3

Recent Reviews

Excellent, awesome // incredible plug in!!
by dglite·3 years ago

Excellent, awesome // incredible plug in!!

Perfect
by holby·5 years ago

keep it going please

much better solutions
by Pexle Chris·5 years ago

No highlighting for snippets.Support also doesn’t exists. You can find much better plugins to insert php code snippets

Very useful
by Nester·6 years ago

A very useful widget. Especially in emergency situations when there is no time to write your own solution for your task.

Awesome Plugin
by Xaib Aslam·6 years ago·1 reply

I was trying to find the updated plugin for PHP and at last I found this, because they update there plugin regularly. So I must say to enjoy this plugin.

Download Trends

Today: 25Yesterday: 25This week: 155Period total: 11K

Compatibility

WordPress2.8+ requiredTested up to 5.9.13
PHPfalse+ required

Version Adoption

v2.4
78.6%
v2.3
18.2%
Other
3.2%

Top Alternatives to PHP Code Widget

WPCode &#8211; Insert Headers and Footers + Custom Code Snippets &#8211; WordPress Code Manager icon
WPCode – Insert Headers and Footers +…
4.93.0M+ installsUpdated 2 weeks ago
ViewCompare
Code Snippets icon
Code Snippets
4.71.0M+ installsUpdated 1 month ago
ViewCompare
PHP Compatibility Checker icon
PHP Compatibility Checker
2.7200K+ installsUpdated 2 years ago
ViewCompare
Error Log Monitor icon
Error Log Monitor
4.320K+ installsUpdated 6 months ago
ViewCompare
SyntaxHighlighter Evolved icon
SyntaxHighlighter Evolved
4.320K+ installsUpdated 1 year ago
ViewCompare
View all php plugins →

Frequently Asked Questions

Changelog

2.4

  • After much demand, made it stop throwing a warning in PHP 8. Please consider ceasing usage of this widget on modern sites. Switch to block based themes, or use purpose specific plugins to solve your needs instead of storing PHP code in the database.
View full changelog on WordPress.org

Contributors

Samuel Wood (Otto)Samuel Wood (Otto)
Plugin Info
Version
2.4
Last Updated
Mar 30, 2022
WP Requires
2.8+
Tested Up To
5.9.13
PHP Requires
false+
Active Installs
90K+
Downloads
994K+
Added
Mar 20, 2008
Business
Free

Tags

phpwidgetexecphp

Developer

S
Samuel Wood (Otto)
9 plugins0.2M+ total installs
View all plugins →

Quick Compare

PHP Code Widget vs WPCode – Insert Headers and Footers +…→PHP Code Widget vs Code Snippets→PHP Code Widget vs PHP Compatibility Checker→

Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.