Influence of WordPress functions on site speed

admin2025-06-04  1

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?

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?

Share Improve this question asked Jan 4, 2019 at 12:49 Amir RafieeAmir Rafiee 312 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 4

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.

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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749045099a315886.html

最新回复(0)