Title: Performance problems with is_required_plugin_active()
Last modified: May 20, 2017

---

# Performance problems with is_required_plugin_active()

 *  [dortheimer](https://wordpress.org/support/users/dortheimer/)
 * (@dortheimer)
 * [9 years ago](https://wordpress.org/support/topic/performance-problems-with-is_required_plugin_active/)
 * I had some tough performance issues with a WordPress, so after digging and profiling
   I’ve found this piece of code that was problematic:
 * — From ‘/wp-content/plugins/swifty-page-manager/lib/swifty_plugin/php/lib_swifty_plugin_view.
   php’ —
 *     ```
       public static function is_required_plugin_active( $plugin_name )
       ```
   
 *  ….
    `// no then we will find out: get all plugins and look for the plugin name
   in the`directory name
 *     ```
        if( ! function_exists( 'get_plugins' ) ) {
       ```
   
 *  require_once ABSPATH . ‘wp-admin/includes/plugin.php’;
 *  }
    ` $keys = array_keys( get_plugins() );
 * The get_plugins function is very very slow and IMHO, an admin function shouldn’t
   be called in the client application.
 * This happens every page view, so the system is unstable, crashes with 10 concurrent
   requests (4 cores, 16 GB) and cannot perform as required.
 * How can I fix this issue?
    -  This topic was modified 9 years ago by [dortheimer](https://wordpress.org/support/users/dortheimer/).

The topic ‘Performance problems with is_required_plugin_active()’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/swifty-page-manager_eff1ef.svg)
 * [Swifty Page Manager](https://wordpress.org/plugins/swifty-page-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/swifty-page-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/swifty-page-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/swifty-page-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/swifty-page-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/swifty-page-manager/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [dortheimer](https://wordpress.org/support/users/dortheimer/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/performance-problems-with-is_required_plugin_active/)
 * Status: not resolved