{"id":71433,"date":"2017-07-19T13:04:33","date_gmt":"2017-07-19T13:04:33","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/log-http-requests\/"},"modified":"2025-11-11T13:14:38","modified_gmt":"2025-11-11T13:14:38","slug":"log-http-requests","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/log-http-requests\/","author":11131896,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.5.0","stable_tag":"trunk","tested":"6.8.5","requires":"5.0","requires_php":"","requires_plugins":null,"header_name":"Log HTTP Requests","header_author":"FacetWP, LLC","header_description":"Log all those pesky WP HTTP requests","assets_banners_color":"","last_updated":"2025-11-11 13:14:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/facetwp.com\/","rating":5,"author_block_rating":0,"active_installs":2000,"downloads":70658,"num_ratings":15,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":15},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1556,908,21104,144028,144027],"plugin_category":[],"plugin_contributors":[78602],"plugin_business_model":[],"class_list":["post-71433","plugin","type-plugin","status-publish","hentry","plugin_tags-api","plugin_tags-log","plugin_tags-requests","plugin_tags-update-checks","plugin_tags-wp_http","plugin_contributors-mgibbs189","plugin_committers-mgibbs189"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/log-http-requests.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<h4>Log and view all WP HTTP requests<\/h4>\n\n<p>How long do [core \/ plugin \/ theme] update checks take to run? What data about my site is being sent out? What about all those ajax requests? The answers to these questions are just a few clicks away.<\/p>\n\n<p>This plugin logs all WP_HTTP requests and displays them in a table listing for easy viewing. It also stores the runtime of each HTTP request.<\/p>\n\n<h4>Available Hooks<\/h4>\n\n<p>Customize the length (in days) before older log items are removed:<\/p>\n\n<pre>\nadd_filter( 'lhr_expiration_days', function( $days ) {\n    return 7; \/\/ default = 1\n});\n<\/pre>\n\n<p>Don't log items from a specific hostname:<\/p>\n\n<pre>\nadd_filter( 'lhr_log_data', function( $data ) {\n    if ( false !== strpos( $data['url'], 'wordpress.org' ) ) {\n        return false;\n    }\n    return $data;\n});\n<\/pre>\n\n<p>In the above example, the <code>$data<\/code> array keys correspond to columns within the <code>lhr_log<\/code> database table.<\/p>\n\n<h4>Important Links<\/h4>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/FacetWP\/log-http-requests\">Github \u2192<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Download and activate the plugin.<\/li>\n<li>Browse to <code>Tools &gt; Log HTTP Requests<\/code> to view log entries.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>Security: Fixed SQL injection vulnerabilities in cleanup() and capture_request() methods<\/li>\n<li>Security: Added prepared statements for all database queries<\/li>\n<li>Security: Added input sanitization for POST\/GET data with proper type checking<\/li>\n<li>Security: Added proper output escaping throughout templates<\/li>\n<li>Security: Fixed potential XSS vulnerability in JavaScript table rendering<\/li>\n<li>Security: Improved data validation with absint() and floatval() for numeric values<\/li>\n<li>Security: Replaced json_encode() with wp_json_encode() for better security<\/li>\n<li>Security: Added capability check to settings page for better access control<\/li>\n<li>Improvement: Updated WordPress compatibility to 6.8<\/li>\n<li>Improvement: Added text domain for internationalization support<\/li>\n<li>Improvement: Modernized code to follow WordPress coding standards<\/li>\n<li>Improvement: Replaced deprecated current_time('timestamp') with modern WordPress functions<\/li>\n<li>Improvement: Improved database table creation using dbDelta() and get_charset_collate()<\/li>\n<\/ul>\n\n<p>= 1.4.1\n* Fixed PHP8 deprecation notices<\/p>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Added extra ajax role validation (props pluginvulnerabilities.com)<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Escaped URL field to prevent possible XSS (props Bishop Fox)<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Ensured compatibility with WP 5.8<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Minor PHP cleanup<\/li>\n<li>Ensured compatibility with WP 5.7<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Moved \"Log HTTP Requests\" to the <code>Tools<\/code> menu (props @aaemnnosttv)<\/li>\n<li>Added \"Status\" column to show HTTP response code (props @danielbachhuber)<\/li>\n<li>Added prev\/next browsing to the detail modal (props @marcissimus)<\/li>\n<li>Added keyboard support (up, down, esc) to the detail modal (props @marcissimus)<\/li>\n<li>Added raw timestamp to \"Date Added\" column on hover<\/li>\n<li>Added hook docs to the readme<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added <code>lhr_log_data<\/code> hook to customize logged data (return FALSE to skip logging)<\/li>\n<li>Added <code>lhr_expiration_days<\/code> hook<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Minor styling tweak<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Better visibility for long URLs<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Minor design tweaks<\/li>\n<li>Replaced <code>json_encode<\/code> with <code>wp_send_json<\/code><\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Tested compatibility against WP 4.9.4<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Log and view all WP HTTP requests","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/71433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=71433"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mgibbs189"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=71433"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=71433"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=71433"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=71433"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=71433"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=71433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}