Title: Security Question
Last modified: August 31, 2016

---

# Security Question

 *  [slebouth](https://wordpress.org/support/users/slebouth/)
 * (@slebouth)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/security-question-17/)
 * Hi,
 * I am relatively new to wordpress. I wanted to add some PHP code on one of my 
   pages to read, write and display from a database. I found the plugin insert php
   which is great and allows me to write the code directly in the page which makes
   things very easy! When I did a search on this I found people saying that writing
   PHP code this way is a big security risk and that we should create our own plugin,
   or update functions.php etc. Is this the case? Using insert php is just so easy!
 * Thanks
 * [https://wordpress.org/plugins/insert-php/](https://wordpress.org/plugins/insert-php/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/security-question-17/#post-7324820)
 * Good for you doing the research.
 * Yes, of course it’s a security risk. I say “of course” because all serious software
   that interacts in any way with the Internet is a security risk, including WordPress
   itself. With that statement, I’m a bit of an alarmist. But when even governments
   can’t keep their data safe, one just needs to determine the level of security
   they’re comfortable with and live life.
 * When an alarmist says something is a security risk, they can do so with smugness,
   knowing they’re right, always right. But they also know that, perhaps subconsciously,
   if they fail to say exactly why something is a security risk, then they really
   are nothing more than alarmists.
 * This is why Insert PHP is a security risk: Anyone who has access to your WP dashboard(
   including guest authors if they have any level of access) can insert PHP code
   into posts and pages. PHP code can wreck things and it can fix things. It can
   help and it can harm. So the first thing is to secure your dashboard as well 
   as you can. Use a long password with a keyboard mix of types of characters.
 * If an unauthorized person has access to your WP dashboard, then there’s more 
   to worry about than just one plugin. They can do anything you can do, but for
   their own reasons.
 * It comes down to this: If you’re uncomfortable with Insert PHP, then don’t use
   it. It may be good to trust your instincts after doing as much research as it’s
   reasonable for you to do.
 * Will
 *  [sumofpwn](https://wordpress.org/support/users/sumofpwn/)
 * (@sumofpwn)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/security-question-17/#post-7324939)
 * We’re currently running ‘Summer of Pwnage’. One of the participants noticed that
   with this plugin enabled any user with role Contributor or higher can run arbitrary
   PHP, which is normally only possible for Administrators. It may be good if the
   plugin allows you to control who is allowed to run PHP.
 * Eg, have a setting in the plugin and when parsing the shortcode check who is 
   the author its roles.
 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/security-question-17/#post-7324940)
 * Yes, anyone with access to the WP dashboard that can create or update posts or
   pages can use the Insert PHP plugin if it’s installed and activated.
 * Will
 *  [sumofpwn](https://wordpress.org/support/users/sumofpwn/)
 * (@sumofpwn)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/security-question-17/#post-7324941)
 * So there are no plans to change this design? Or maybe add a security warning?
 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/security-question-17/#post-7324942)
 * It is not a security issue of Insert PHP’s. It is a security issue of the operator
   of the WP installation. Saying or implying otherwise doesn’t make it otherwise.
   It is clear in the Insert PHP description, or at least clearly implied, that 
   WP dashboard access is how to use Insert PHP. If certain people or categories
   of people are not to have access to Insert PHP, then either remove those people
   from the dashboard or uninstall Insert PHP. You are welcome to hire a programmer
   to restrict the use of Insert PHP to certain people or categories of people or
   do it yourself; Insert PHP is open source; it is also short, succinct, and easily
   readable by proficient PHP programmers. But I am unwilling to suffer the opportunity
   cost of upgrading free software for a special use case.
 * Will

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Security Question’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/security-question-17/#post-7324942)
 * Status: not resolved