HTTP Requests Manager

HTTP Requests Manager Install Statistics

0
100%
Today: 11 Yesterday: 11 All-time: 1,512 downloads
HTTP Requests Manager Icon

Try plugin: HTTP Requests Manager

We'll create fresh WordPress site with HTTP Requests Manager installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About HTTP Requests Manager

Limit, disable, block, log all WP_HTTP requests. Limit by request count, page load time or lower timeout for each request.

1


0


0


0


0

updated: 9 months ago
since: 1 year ago
author: veppa

Description

Prevent WP HTTP request to slow down your WordPress website and admin interface

Do you have a slow WordPress admin that takes longer than usual to load? Sometime longer than 5 seconds to load admin or login pages. In rare occasions WordPress may even timeout and show 504 page.

Reason may be slow external WP_HTTP requests. HTTP Requests Manager plugin will log all WP HTTP requests with time taken to complete each request. If there are multiple request per page they will be color grouped.

Plugin tested with PHP version 5.6, 7.x and up to 8.2.

Do not confuse WP_HTTP request with HTML requests that loads page assets like js, css, image, font

Plugin only detects and manages requests made using WP_Http class. Which is default method used and advised by WordPress for getting remote data and updates.

Plugin will not detect any requests made by other WordPress classes like WP_Http_Curl or PHP functions like curl_exec, fsockopen, file_get_contents etc.

Do not confuse it with HTML requests (loading assets like css, js, image) done by HTML page. WP_Http requests are performed only inside PHP files and not visible in web browser.

Learn more about difference between WP_Http requests and HTML requests

How plugin prevents slow pages containing WP_HTTP requests?

Plugin helps to prevent website slowdown by:

  • Sets request timeout period to 1 second. Where default is 5.
  • Limit number of request per page by 3. Default is unlimited.
  • Limit WP HTTP request if page load time is longer than 3 seconds. Default is unlimited.
  • Option to block all external requests or allow only requests to wordpress.org for plugin, theme and core updates.

Operation mode

Plugin has following operation modes in setting to manage WP HTTP requests. Here is what each mode does:

  • Only log HTTP requests — logs all non cron requests. No blocking done.
  • Only log HTTP requests (+ cron requests) — logs all requests including cron. No blocking done.
  • Smart block — logs non cron HTTP requests and blocks request using following rules.
    1. Page processing time exceeded 3 seconds.
    2. Number of request for single page reached 3.
    3. Sets timeout for each request to 1 second.
    4. Sets number of redirects for request to 1.
    5. Apply custom rules for “Smart block” defined in settings.
    6. Prevent some built in requests: happy browser, maybe update, self pings.
    7. Skip limitations listed above for: file downloads (plugin, theme, other), requests inside cron jobs.
  • Block external requests — all requests not matching your current domain will be blocked. No updates for WordPress core, plugins and themes. (+ Smart block features.)
  • Block external requests (allow WordPress.org only) — all requests not matching your current domain and wordpress.org will be blocked. Allows updates for WordPress core, plugins and themes coming from wordpress.org website. (+ Smart block features.)

Custom rules only work in “Smart block” mode. It will not work in “Block external requests” or “Block external requests (allow WordPress.org only)” mode.

Disable logging

After using plugin for some time and knowing which requests are performed you can disable logging. Operation mode will remain unchanged. Request blocking will remain in tact. No new logs will be recorded. You can analyze old logs, they will not be deleted.

Custom rules for “Smart Block” mode

Allow or block some requests based on domain, plugin or all. Choose on which page type rule will be applied. For example you can block requests in frontend while allowing in other pages.

Finally you can define action as block or allow for custom rule. For example you can make sure that some plugin will always be allowed to send WP_HTTP request. This can be SEO or mail plugin that uses remote API for functioning.

Features

  • View blocked requests by this plugin. Show reason why it was blocked.
  • View failed requests with error message.
  • View what initiated HTTP request: WordPress core, plugin or theme.
  • View on which page request was made. Also view page type is frontend, admin, login, cron, ajax or rest_api.
  • View list of other requests made on same page view.
  • View sent and received data.
  • How long it took to get response in seconds.
  • Check Point with page time and memory usage for most common hooks like plugins_loaded, init, wp_loaded, setup_theme, after_setup_theme, shutdown. This will give some idea about cause of slow pages.
  • Only last 1000 records will be stored.
  • Group requests by URL, domain, initiator, plugin, page, response status etc.
  • Add custom rules (conditional logic) to block or allow certain requests.

Log summary populated for visible logs in selected page. Summary has following information cards:

  • Blocked requests percentage. When hovered it will show request breakdown by core, plugins or theme.
  • Number of requests per page. When hovered shows breakdown by page type: Frontend, admin, login, cron, ajax, rest_api.
  • Request time / Page time percentage.
  • Average page time.
  • Average request time.
  • Number of hosts. On hover shows breakdown of hosts.

Use cases

  • Check if your website slow because of WP HTTP requests. Average page load time, average request time and average number of requests per page shown as summary at the top of reports.
  • Block all external request on development or localhost website. All updates will be blocked. You switch off blocking when you want to perform Core, Plugin, Theme updates. No need to use define(‘WP_HTTP_BLOCK_EXTERNAL’, true); in your wp-config.php. Plugin will prevent requests automatically when you choose “Block external requests” or “Block external requests (allow WordPress.org only)” operation mode.
  • Block non WordPress request. No data will be sent to third parties. They are usually loading other website news, plugin/theme promotions, advertisements, sending usage statistics etc.
  • Prevent your website from timeout. By blocking all requests if page generation time exceeds 3 seconds. Kill slow HTTP request with small timeout of 1 second. Slow request can be because of temporary network problem or remote website can be too busy to respond on time. Slow request is not your fault so your website should not suffer from it.

More info about “HTTP Requests Manager” plugin on official home page →

Credits

What’s next

If you find this plugin useful to view WP_HTTP requests and speeding up your admin pages by blocking some requests then give good rating. Also check my other projects:

  • Share button without plugin – add super fast native sharing button to your website. Tiny inline code, ad blocker safe, no external dependencies.
  • bbPress WP Tweaks – add custom sidebar, additional widgets and forum columns for sites powered with bbPress forum plugin.

Visit veppa.com to learn from my WordPress tutorials.