• One of my WP sites is heavily dependent on plugins – I have 23 currently enabled to get the functionality I want in the site, but I really don’t want that many plugins bogging down the site speed.

    Many of these plugins are very simple and could, I think, easily be migrated into maybe functions.php in my child theme. Is there a decent tutorial for non-programmers on how to migrate plugin functions into the core?

Viewing 6 replies - 1 through 6 (of 6 total)
  • jack randall

    (@theotherlebowski)

    one of the main reasons for keeping non-core code in separate plugins is to keep them separate.

    when you update the core any changes you made to it, any additional code you’ve added will get overwritten by he new default files. one of the other reasons to keep them separate is that when the developer of the plugin releases an update to make it compatible with the latest version of wordpress you can just click update without having to read through possibly thousands of lines of code to find the few bits that are different.

    work on speeding up your site rather than clogging it up with extra code. a decent caching plugin and a content delivery network could probably help a lot.

    just out of interest:

    what version of wordpress are you using?
    what plugins are on your site (active and deactivated)?
    what themes are you using?

    Many of these plugins are very simple and could, I think, easily be migrated into maybe functions.php in my child theme…to migrate plugin functions into the core?

    Into a Child Theme and “into the core” would be quite different, but maybe “core” is not what you actually meant.

    I once tried what you are mentioning, and there was no real gain for all the effort…and I also run over twenty plugins at my sites. Having code in a theme folder rather than in a plugin folder does not change anything other than to possibly facilitate removal of a Donations button or two.

    WP Crontrol is a plugin I use to take a look under the hood and reduce activity behind the curtain, and WP Clean Up is great for removing clutter and optimizing a database.

    Thread Starter qlddrones

    (@websupportguy)

    @jack randall, yes good point. I am using WP4.0.1 with a premium theme called GeoTheme and a lot of plugins. 41 active, 27 inactive. Why?

    – Serving ads in widgets
    – Affiliate link cloaking (trying to back out of that one)
    – Anti spam
    – Minification
    – Custom permalinks
    – Yoast analytics and SEO
    – iThemes security
    – Jetpack (though not using much of it now)
    – Jquery Pin It button for images
    – HTML sitemap
    – Local currency conversions (travel website with lots of cost articles)
    – Mappress for location maps and cluster maps
    – NoFollowr for tidying up external links
    – Relevannsi to improve user search results
    – Roots plug to minimise HTML code
    – Simple Author Box to display guest author details
    – Weather Underground to display weather forecasts
    – YouTube because WP YouTube shortcodes don’t seem to work

    Most of the inactive plugins are those I use occasionally for specific purposes like:

    – Search and Replace
    – 7T File Manager
    – Adminer
    – Bulk Delete
    – Copyscape for guest post checking
    – Image Optimizer
    – etc.

    I have had GZ compression enabled on the server but saw no difference in page loading times or response times. I’ve used various CDNs in recent times like Jetpack Photon and Cloudinary, but I’m currently using Cloudflare.

    @leejosepho, I am using a child theme – should have mentioned that. I will have a look at WP Crontrol (not that I need another plugin LOL).

    jack randall

    (@theotherlebowski)

    looking at the list of plugins you’ve got there i can tell you that many of them are not simple!

    they may do something that appears simple but they’re by no means an easy thing to dismantle and relocate. certainly not for a non-programmer. i don’t program myself (i tried but it’s not my bag) but when i look at all the code that goes into a plugin, even a simple one, i know that it’s likely to have taken weeks to design it, code it, debug it, beta release it, act on feedback, debug it again and then release it, not to mention the years of study and practice that are behind the developer(s) that the thought of trying to combine not only their work but the work of the core’s developers is a challenge only for the hardcore code jockeys out there.

    if there are plugins you’re not using and have no real intention of using then just delete them, think of it as housekeeping. no sense keeping all that extra code and database table clutter laying about slowing things down. a good caching plugin and a chat with your hosting to see if there’s anyway they can optimise your server (not likely to happen on shared hosting…) to speed up delivery and smoothness.

    Thread Starter qlddrones

    (@websupportguy)

    Maybe then I need to change the question. Is there perhaps a way to restrict the firing of plugins to only those pages/posts that actually need them? This would help a lot. When I think about it this doesn’t seem very likely, but I think it’s worth asking the question.

    jack randall

    (@theotherlebowski)

    this is already the way they work, they only generate content or manipulate data in the places you call them. that can mean where you use shortcodes or widgets or whatever, they only act on things you tell them to.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to integrate plugin code into core?’ is closed to new replies.