is there a benefit in using a constant over get_stylesheet_directory_uri?

You can read up the source code of theme.php where get_stylesheet_directory_uri() is defined, inside you’ll see a str_replace() wich is consuming additional resources on each request. The best way to avoid this is to define a variable or constant that contains the path. In that case it is only called once. https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/theme.php#L0

Performance vs plugin genrated javascript

When enqueuing a custom script, you can write them to load in the footer – prior to the </body> tag – making them non-render blocking for most purposes, but they may still come up as render-blocking on testing tools, since they literally must be executed before the page HTML can be considered fully loaded. Instead, … Read more

Optimizing site speed by localizing paths

This is nonsense. Almost all URL getters are a result of get_option(), eg. get_option(‘stylesheet_root’), get_option(‘template’) and so on. These options are loaded very early during the request, they are cached and not fetched again. Since the options are fetched anyway, all you can improve is processing time. Nanoseconds. This isn’t worth the trouble. Just compare … Read more

Suggestion to improve slow WordPress page

There are following ways you can improve it; Use cloudflare and tick all the three options in Minify tab. Do not use Jetpack (If you’re using then do not use “Photon” option if you have cloudflare running on your site.) Use W3 Total Cache. Use Autoptimize. Use Async Autoptimize plugin. Turn on Lazy load if … Read more

Limit Login Attempts BEFORE PHP is executed?

If the “attack” is distributed, the only thing you can do is to change the url of the login endpoint. This should be easy to do with web server config (block /login and friends, map some other “slug” to wp-login.php). This will also break the automatic redirect from /wp-admin to /login which is a good … Read more

use of 10 new WP_Query : loading too slow (with url) [closed]

Why don’t you create a category-bio.php template that uses the normal loop? The WordPress query will already be built and you won’t have to have to create a new query just to do an operation that is already happening already. You should really look at Wordress’ Template Hierarchy http://codex.wordpress.org/images/1/18/Template_Hierarchy.png You can target specific categories with … Read more