Prevent CSS/JS loading when plugin is not used

You need to use action wp_enqueue_scripts except wp_head like: function inf_remove_junk() { if (!is_admin()) { wp_dequeue_style(‘js_composer_front’); wp_dequeue_style(‘js_composer_custom_css’); wp_dequeue_script(‘wpb_composer_front_js’); } } add_action( ‘wp_enqueue_scripts’, ‘inf_remove_junk’ ); But it remove the scripts from front end. I think on archive pages VC does not execute it’s shortcode. So you can check is_archive() condition instead of is_admin(). Or you can … Read more

Changing BIGINT to INT

There should not be any downside. The user ID is cast to int in many places in the WP PHP files anyway. But I don’t think this is a real performance problem. If your queries are slow, it might be more useful to inspect each of them and look for opportunities to improve the queries … Read more

Relationship between performance and database size

A bigger database isn’t per definition slower, and a smaller database isn’t per definition faster. When a table contains a large amount of information, it could take longer for queries to get their results, depending on the type of query, the amount of data you want to return, the table structure attributes, types and indexes. … Read more

Hardcoding and WordPress Performance

This is a PHP question not related at all to WP, but since it was upvoted…. TL;Dr version – Compilres do this kind of micro optimizations much better then you, no point in even trying. lets look at what compilers will do with your question code // is this less efficient $meta = get_post_meta($post->ID,’meta’); $permalink … Read more

Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)

Without looking at your box to see exactly what’s going on, here are some potential avenues of slowness: Potential Causes Apache Apache is usually configured in such a way that a single httpd process is always running in the background. When a request comes in over the wire, it spins up a new httpd process … Read more