Skip to content

Repository files navigation

oik-unloader

banner

WordPress Must Use plugin to unload unnecessary plugins on demand.

Description

Use the oik-unloader plugin to unload unnecessary plugins on demand.

Many websites have lots of plugins activated because the functionality is sometimes needed. But quite a few of these plugins:

  • think they're needed all the time,
  • do a lot of processing for each incoming request,
  • only to find that there was no need for the work that they'd done.

These slow the server side processing of the site. This can increase the server response time; time to first byte. The plugins can also slow the front end of the site; delivering scripts, CSS and even HTML and images that are not actually needed.

Dynamically unloading a subset of plugins for certain requests could improve the overall performance of the site. This could help improve the Core Web Vitals which may lead to better rankings in Search Engine Results Pages ( SERPs ).

Installation

  1. Upload the contents of the oik-unloader plugin to the `/wp-content/plugins/oik-unloader' directory
  2. Activate the oik-unloader plugin through the 'Plugins' menu in WordPress
  3. Visit the oik-unloader admin page
  4. Use the admin interface to select which plugins to deactivate for selected URLs
  5. Click on the link to activate/update the Must Use ( MU ) plugin
  6. Disable the MU logic using the Deactivate link
  • Note: In a WordPress Multi Site installation
  • There will only be one version of the Must Use plugin ( oik-unloader-mu.php )
  • There will be multiple unloader files; one per site.

Frequently Asked Questions

What is this plugin for?

Performance tweaking.

  • It helps to reduce the number of activated plugins for a particular request.
  • It dynamically removes the unwanted plugins from the list of plugins to be activated.
  • The plugin temporarily deactivates plugins for the specific URL.
  • It doesn't unload them, it prevents the plugins from being loaded.

Which plugins can I deactivate?

For certain URLs you should be able to deactivate a whole host of plugins that aren't actually required for the front end. You may find that some plugins are extremely well behaved and it won't make the slightest difference if they're left activated.

Why deactivate rather than activate?

By targetting specific URLs you can deactivate plugins that you're certain are not needed. For example, you may have a number of posts that display charts. For these you will need to ensure that the chart plugin is activated. For any other post, the plugin that displays the charts doesn't need to be activated. If it improves the performance, then you may consider deactivating the chart plugin for these other posts. The tweaking is intended to get the best performance for specific URLs. Concentrate on the most visited pages first and deactivate only those plugins that you know you can safely deactivate.

It's primarily the front end experience that we want to improve.

When using the WordPress admin interface you'll expect each of the plugins to operate correctly. Therefore you would expect the plugins to be activated. The REST API and AJAX requests should also produce the expected results.

Screenshots

  1. oik-loader admin page - plugins
  2. oik-loader admin page - oik-loader-mu not activated
  3. oik-loader admin page - oik-loader-mu activated

Upgrade Notice

0.4.0

Update for accessibility improvements to the active-plugins block

0.3.2

Update for PHP 8.4 - tested manually

Changelog

0.4.0

  • Changed: A11y - try adding aria-label attr to local implementation of icheckbox() #15
  • Fixed: Corect load_dir_files() method #14
  • Tested: With WordPress 6.9
  • Tested: With PHP 8.3
  • Tested: With PHPUnit 9.6

0.3.2

  • Changed: Support PHP 8.4 #14

Further reading

See also oik-loader which adds plugins to the list of plugins to activate.

If you want to read more about oik plugins and themes then please visit oik-plugins

About

WordPress Must Use plugin to unload unnecessary plugins on demand

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

Sponsor
SponsoredKunjungi sekarang
Promo