A
A
Alejandro Matias2016-09-15 17:10:16
Programming
Alejandro Matias, 2016-09-15 17:10:16

How to remove unnecessary code (optimize) Wordpress?

I will note right away that I am not a programmer, so I actually ask for advice.
Premium woocommerce based theme generates a lot of this garbage
ddf6de2e8e504e77994cd0f454d67f4e.jpeg
One of the scripts in < body > is over 283,000 characters... This JS code and JS templates are generated automatically by the theme, probably a lot of extra stuff for different pages. Part of the code is generated by plugins. The page itself is heavy 1.9 MB. This is extremely negative for SEO.
I was offered not to dig up all the reasons in the theme and plugins, but instead to make a plugin - it, together with caching, will work on the server side to process the file cache, move all the "extra" code to external files and connect these external files to the appropriate places in the code. + organize work with cron on the server.
That is, all "not optimal code" will be constantly checked and optimized, as a result, the cache that is given to users and search bots will be optimized as much as possible. And with this solution, I will be spared from similar problems in the future.
Do you think this is an acceptable option for Wordpress? Or do I need to go the other way and dig to optimize a theme that is already highly optimized?
Who will tell, that huge + in karma.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Gleb Gryadk.in, 2016-09-15
@Gryadk_in

1 - I'm not a supporter of doing something else out of don't understand what.
I would decode and see what is superfluous.
Do not produce entities unnecessarily (c)
2 - creating a cache is a load on the processor. On some hostings, this can be critical.

E
Evgeny Vlasov, 2016-09-15
@iamskodnik

In my opinion, it shouldn't be complicated.
If you get away from this topic, its demo is here - classifiedengine.enginethemes.com , there is no way, then I would recommend contacting the developers with a question about ways to optimize its work. I'm sure this question has been raised by them more than once (this code is in similar volumes on the demo) and there must be a more reasonable way to optimize the code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question