Title: Minimizing Plugin Impact
Last modified: August 20, 2016

---

# Minimizing Plugin Impact

 *  Resolved [AK Ted](https://wordpress.org/support/users/akted/)
 * (@akted)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/minimizing-plugin-impact/)
 * What is the current best practice for limiting the scope of a plugin you’re creating?
   For example, say you have a plugin that only does stuff backend (admin). One 
   way I thought of was
 *     ```
       <?php
       // Plugin Name:...
       if (is_admin()) include('the-rest.php');
       ?>
       ```
   
 * Is there a better way?

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/minimizing-plugin-impact/#post-3305828)
 * [http://codex.wordpress.org/Writing_a_Plugin](http://codex.wordpress.org/Writing_a_Plugin)
 *  Thread Starter [AK Ted](https://wordpress.org/support/users/akted/)
 * (@akted)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/minimizing-plugin-impact/#post-3305873)
 * [@t-p](https://wordpress.org/support/users/t-p/): I’m not sure how that’s an 
   answer to my question. Searching that page, I don’t find any occurrences of these
   words: best, practice, limit, or scope. Minimize is listed, but only in re: to
   db’s. I didn’t see anything there about what I asked.
 * It’s almost as if I asked “What internal temp should I cook a turkey to?” and
   was given a cookbook, hoping that the answer might be in there.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/minimizing-plugin-impact/#post-3305878)
 * The linked is a WP codex article about creating plugins. If you did not find 
   a specific info i it, just keep searching the forums. Or someone more expert 
   in that may chime in.
 * Happy Holidays!
 *  Thread Starter [AK Ted](https://wordpress.org/support/users/akted/)
 * (@akted)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/minimizing-plugin-impact/#post-3305944)
 * Found a better way
 *     ```
       <?php
       // Plugin Name:...
       if ( ! is_admin() ) return;
   
       // rest of code goes here
       ?>
       ```
   

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

The topic ‘Minimizing Plugin Impact’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 2 participants
 * Last reply from: [AK Ted](https://wordpress.org/support/users/akted/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/minimizing-plugin-impact/#post-3305944)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
