Skip to content

View External Requests by WordPress Plugins

WordPress is a successful and popular CMS because of Plugins. While plugins add extra features to WordPress websites we do not know how they work in the backend. How they use the database, filesystem, external requests, CPU and RAM resources of your web server.

In this tutorial I will show how to view external requests made by WordPress plugins.

You need to view requests made by plugins in order to know if they are:

  • Wasting your server resources.
  • Slowing down your website.
  • Sending sensitive information to external servers.

External requests are performed using the WP_HTTP class provided by WordPress core. All plugins and WordPress itself uses it to communicate to external servers. It is also known as API calls, remote requests.

To view external requests I am using the HTTP Requests Manager plugin.

You will learn:

  • Compare external request usage by WordPress core vs Plugin
  • View External requests by each plugin
  • View details of each WP_HTTP request

View video tutorial on Youtube.

View Plugin vs WordPress Core Requests

Let’s see which one makes more requests WordPress core or installed plugins.

 

WordPress core vs. Plugin requests chart.

To view requests made by plugins and compare them use the following steps.

  1. Install and activate HTTP Requests Manager plugin from repository.
  2. Navigate to the “Tools” → “HTTP Requests Manager” page to make sure that it works.
  3. Wait some time until some external requests are recorded. Couple hours or days.
  4. Navigate to “Tools” → “HTTP Requests Manager” page.
  5. Select “Group by Initiator Type” option from the select box at the top.

From the screenshot above we can see that plugin requests are close to requests made by WordPress core. This proportion may change depending on your wordpress usage, plugins, time. For example if you navigate to the next page in the report you may see different proportions.

Also we can see that the average request for core took 0.3 seconds while for requests by plugins it is 0.1 second. Which means plugin requests are faster than core requests for a given time period.

If you have only “core” requests then you are lucky because plugins on your website do not use external requests. Or you do not have any plugins at all. In both cases it is a huge performance gain. Congratulations!

This report shows requests by all plugins. Now lets see requests for each plugin.

How to view External Requests by Plugins?

External Requests by WordPress plugins. View number of requests, their status and avarage time per request.

Request grouped by plugin shows more detailed usage of WP_HTTP class for communication.

To view requests by each plugin follow these steps:

  • Navigate to “Tools” → “HTTP Requests Manager” page.
  • Select the “Group by Initiator” option from the select box at the top.

Report groups WP_HTTP requests made by individual plugin and WordPress core function.

This shows all requests. Not only external ones. Plugins sometimes perform internal requests as well to start separate processes for completing some slow tasks.

Plugin group has different colors representing request status.

  • Blue – successful requests
  • Orange – blocked request
  • Red – requests with error

Knowing that you can easily pinpoint if there is an error that needs to be fixed. You can also check if blocking rules defined by you is applied when you see complete orange color for a plugin.

View individual requests inside plugin group. See full request URL and related plugin name.

Click on any plugin group to reveal all requests related to that plugin.

You will see an external URL request made. Plugin name and “Blocked” badge with explanation if a related request is blocked.

From the above screenshot we see that the plugin “Plugin Load Filter” tries to load translation from wordpress.org.

I am using English wordpress, not sure why it needs to load a translation on a post editing page.

So I blocket this request so it does not degrade performance of my WordPress website.

View details of External Requests made by WordPress Plugins

To view more details related to any request click on request URL.

View individual request data, page time, request time, response.

Popup will open as you can see in the above screenshot.

You can view request URL, time spent for request, page URL, time spent to generate page, related plugin, reason if it is blocked or returned error, request and response data.

Conclusion

Viewing request made plugins helps to monitor external communication made by plugins. This will help you to optimize WP_HTTP requests and server resources of your WordPress website.

Custom rules to block or allow requests by domain or plugin.

Using data you learned you can then decide which plugin requests to block or allow.

What is next?

Learn more about HTTP Request Manager plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *