Hi,
What if you remove the code you added to defer parsing JS? Did the site speed back to 5-6 seconds from the 54seconds?
PS: The article you’re trying is 3years old, and the filter used in that clear_url is also deprecated. So try some new solution or try using any Cache plugin, that will help you to reduce loading time, instead tackling each issue separately.
Let us know,
Thanks,
laranz.