Add PHP code to your pages and posts easily using shortcodes.
As of April 2026, Insert PHP Code Snippet is a WordPress Add PHP plugin with 100K+ active installations and a 4.9/5 rating from 698 reviews. It has been downloaded 1.6M+ times in total. Requires WordPress false+ and PHP false+. Available on WordPress.org since 2013. Actively maintained — updated within the last month. Downloads are down 24% this week.
A quicklook into Insert PHP Code Snippet
★ Convert PHP snippets to shortcodes
★ Insert PHP code easily using shortcode
★ Support for PHP snippet shortcodes in widgets
★ Dropdown menu in TinyMCE editor to pick snippet shortcodes easily
Insert PHP Code Snippet allows you to create shortcodes corresponding to PHP code snippets. You can create a shortcode corresponding to any random PHP code such as ad codes, login validation etc. and use the same in your posts, pages or widgets.
The shortcodes generated using the plugin are easily available as a dropdown in the standard wordpress content editor as well as in widget settings, thereby giving you ease of integrating your PHP snippets with your posts and pages.
Insert PHP Code Snippet is developed and maintained by XYZS…
This is a great plugin when you don’t have errors in php. Just don’t re-use functions with the same name on the same page with menus / widgets that use the snippet or it will throw a broken site error.
Minus 1 star on the latest version as when I try to run a snippet on demand I get a json error (but am not using json), regardless of whether or not that code is already being used somewhere else successfully in snipet form.
What’s really cool is you can use a post’s custom fields to control variables in php snippets via:$var = get_post_meta(#_of_post,'name_of_custom_field',true);
And then $someothervar = $$var to access the custom field’s raw value to make custom variables a snap without having to write an admin interface in the dashboard for custom variables.
I also use a different php snippet program that suddenly had several of my snippets fail. I loaded this snippet program; and, using the exact same snippet code, it worked fine.
I wrote some custom code to query an API and display a map of the results. This plugin is a simple and fuss-free way to add this to a specific web page using a shortcode. In due course we’ll probably pay for the version that supports JS as well.
Love it 🥰
It simply does what it is supposed to do. And it does it very well, reliably and easily. That’s how you imagine a helpful plugin to be. Perfect.
| WordPress | false+ requiredTested up to 6.9.4 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.