The are many things that will affect the speed, security and functionality of your WordPress website. Even though there are plugins that claim they can do all of this it is its hard to find ones that work as expected. This is because plugins often have un-needed code in them. This allows the developer to target a larger audience.
Moving scripts to the footer
WordPress recommends that developers use an enqueue system to add scripts. This is because it allows you to change how they are rendered at runtime. By adding the following piece of code, we are able to tell WordPress to load then in the footer of the website instead of the header. This means that the content is able to load without having to wait for other scripts.
remove_action('wp_head', 'wp_print_head_scripts', 9);
remove_action('wp_head', 'wp_enqueue_scripts', 1);
remove_action('wp_head', 'wp_enqueue_style', 1);
add_action('wp_footer', 'wp_print_scripts', 5);
add_action('wp_footer', 'wp_enqueue_scripts', 5);
add_action('wp_footer', 'wp_print_head_scripts', 5);
add_action('wp_footer', 'wp_enqueue_style', 5);
Compress files manually
Another way of speeding up your WordPress website, or any website, is by compressing files. This should always be done manually where possible. Using a plugin that does this at runtime may make your download time quicker, but it can also make your TTFB (time to first byte) slower.
For optimising images, we recommend you use a plugin like EWWW Image Optimizer. This is because it will only do the optimisation from the WordPress admin panel and not a runtime. Meaning that it won’t slow down your users performance.
Graphics created by Sean MacEntee
There are lots of plugins that will improve your security. The security plugin the we recommend you use it Sucuri. The hardening options are extremely useful, it also offers to protect you WordPress website with a firewall for paid accounts.