Plugins: HTTP Request Control

Plugins: HTTP Request Control

Block all HTTP requests

https://gist.github.com/logichub/ef4bc9fc5961ba1c634a

https://core.trac.wordpress.org/ticket/52428#comment:1

https://gist.github.com/nullvariable/56eab9ab40d9fa1f7acc4b1b6e6327e9

or

define( ‘WP_HTTP_BLOCK_EXTERNAL’, true );

define( ‘WP_ACCESSIBLE_HOSTS’, ‘api.wordpress.org,*.github.com’ );

add_action(’_admin_init’, function () { global $pagenow; if (in_array($pagenow, [‘plugins.php’, ‘plugin-install.php’, ’themes.php’, ‘update.php’, ‘index.php’, ‘admin.php’, ‘update-core.php’])) { add_filter(‘pre_http_request’, ‘__return_false’, 100); } else { add_filter(‘pre_http_request’, ‘__return_true’, 100); } }, 1);


Logging WordPress REST API errors – Ian Dunn


The Only Plugin That Logs Both Incoming and Outgoing Traffic

Novi favorit je Traffic sa repo na Pierre-Lannoy/wp-traffic: Full featured monitoring & analytics for WordPress APIs.. Apsolutno odličan.

API Log Pro is a plugin that is regularly updated and logs both incoming and outgoing API calls. However, it has a few significant drawbacks. Firstly, I dislike that it inserts itself into the root Admin menu, but this can be easily remedied. Secondly, it is hard-coded to keep logs for 15 days, which is simply too long in the case of some poorly designed plugins that inundate the REST API, such as “Real Cookie Banner,” as it will cause the database to balloon to unreal sizes in those 15 days. If there were a setting to delete logs based on the number of entries, it would be much safer. The repository can be found at hubbardlabs/api-log-pro: A simple plugin to log WordPress Rest API Requests.

We will refer to incoming traffic as “REST API”

This occurs when someone external to or within WP calls the WP REST API or XML-RPC, which slows down the entire site.

Please note that logging REST API calls can rapidly fill up tables in your database, potentially making it huge. Therefore, if you plan to use it in production, be mindful of this. It is recommended to turn it on for a brief period and then disable it.

For monitoring incoming traffic, I recommend the REST API Log plugin, as it is the most reliable in all aspects, except that it only deals with incoming traffic and not outgoing. Its repository can be found on petenelson/wp-rest-api-log.

Caching REST API

To cache REST API requests, consider using the API Cache Pro plugin available on hubbardlabs/api-cache-pro repository. It’s a great solution for this purpose.

By default, WP Rocket does not cache REST API requests. To enable caching, use the helper plugin provided in their knowledge base.

W3 Total Cache Pro has a built-in option for caching REST API requests.

On the other hand, WP Super Cache does not cache REST API requests, but the author recommends using other plugins, as mentioned in WordPress.org. However, it’s worth noting that these alternative plugins may be slower. Check out the analysis provided in this thread.

For a separate and well-maintained plugin, try WP REST Cache.

Although WP REST API Cache with its airesvsg/wp-rest-api-cache repository existed, it is no longer maintained properly.

Izlazni saobraćaj ćemo zvati “HTTP Requests”

Izlazne samo: Log HTTP Requests with repo FacetWP/log-http-requests je osnovni plugin koji log sve izlazne WP_HTTP requests. Mislim da je ovo najpoznatiji plugin od svih.

Inspect HTTP Requests on the expresstechsoftware/inspect-http-requests repository also displays only outgoing requests, but is more comprehensive than others as it includes request blocking, which is really useful for speeding up administration, even though there is a separate plugin for that purpose. As the authors say, they were inspired by the “Log HTTP Requests” plugin.


Offline Mode for WordPress is a plugin called ‘wp-offline’ found at the bueltge/wp-offline repository. This plugin deactivates auto-updates for WordPress core, plugins, themes, and HTTP calls. The accompanying text provides an explanation of its functionality, which is mostly comprised of hooks and a few commands. For more information, visit this link.What I see from the code is that it blocks all external scripts and styles, which can sometimes mess up the website, although - if I have done everything correctly, it should not.

https://github.com/bueltge/wp-offline/archive/refs/heads/master.zip


pbiron/updates-api-inspector: Inspect various aspects of the WordPress Updates API


Meinetanne je imao problem sa brojem Update-check-ova koje mlate pluginovi i core

Stop update Odlično

Local Development sa repo na afragen/local-development

GitHub - cliffordp/tk-exclude-vcs-updates: Exclude plugins whose folders contain a VCS directory from appearing in the list of updates. ali čak je i on shvatio da već postoji bolji plugin - Local Development


Old: Core Control Ali je bio dobar, pogledaj ga pa možda napravi novi…


Snitch is network monitor for outgoing data traffic


date 12. Oct 2022 | modified 29. Dec 2023
filename: Plugins » Update Control » HTTP Requests