2

We know, that wordpress has custom functions that create in wp-includes and etc... and its system has more includes and functions(without calling)... My question is: Is abound of wordpress functions and includes, reducing site speed or no?

3

Functions and includes (itself) don't affect the site performance much. But...

The code inside a function can affect site speed. It all depends what exactly that function does.

For example function esc_attr won't affect site speed, because its code is simple and will run fast.

On the other hand, functions like get_posts can take a lot of time to execute, because it has to parse your arguments, query the DB, obtain results and create objects for every row. So if you query for a lot of posts, it can consume a lot of time.

Another example of time-consuming function will be wp_remote_get. It retrieve the raw response from the HTTP request using the GET method. So you'll have to wait for the requested server to generate answer and so on.

Also, some functions run filters/actions inside. So themes/plugins may affect speed of their execution.

  • I think even get_posts function while didn't call, can't has any effect on site speed. Is it right? – Amir Rafiee Jan 4 at 13:47
  • Yes, if the function doesn't get called, then it doesn't affect site speed. – Krzysiek Dróżdż Jan 4 at 13:48
0

It depends on the use of functions usually the functions which are called in the frontend may effect site speed but the functions effecting in backend will not. However in most of the case the functions which are used to call another 3rd party URL may effect performace of the website

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.