From e0acd4833354f62c44ebd659084dbf57b5d021e0 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 11:38:34 -0400 Subject: [PATCH 1/5] fix(logging): use a plain version in the Requires PHP header Plugin Check rejects "8.1.2+" and flags the mismatch with readme.txt, which says 8.1.2. --- plugins/wpgraphql-logging/wpgraphql-logging.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wpgraphql-logging/wpgraphql-logging.php b/plugins/wpgraphql-logging/wpgraphql-logging.php index 37e4d551..42d823ce 100644 --- a/plugins/wpgraphql-logging/wpgraphql-logging.php +++ b/plugins/wpgraphql-logging/wpgraphql-logging.php @@ -12,7 +12,7 @@ * Domain Path: /languages * Requires at least: 6.5 * Tested up to: 6.9 - * Requires PHP: 8.1.2+ + * Requires PHP: 8.1.2 * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html * Requires Plugins: wp-graphql From c820a6e2e004da912593550f86d89530e8867d8e Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 11:39:07 -0400 Subject: [PATCH 2/5] fix(logging): block direct access to the files Plugin Check flagged --- plugins/wpgraphql-logging/activation.php | 4 ++++ plugins/wpgraphql-logging/deactivation.php | 4 ++++ .../wpgraphql-logging/src/Admin/Settings/Templates/admin.php | 4 ++++ plugins/wpgraphql-logging/src/Admin/View/List/ListTable.php | 4 ++++ .../src/Admin/View/Templates/WPGraphQLLoggerNotice.php | 4 ++++ .../src/Admin/View/Templates/WPGraphQLLoggerView.php | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/plugins/wpgraphql-logging/activation.php b/plugins/wpgraphql-logging/activation.php index 102cd706..af01d313 100644 --- a/plugins/wpgraphql-logging/activation.php +++ b/plugins/wpgraphql-logging/activation.php @@ -11,6 +11,10 @@ use WPGraphQL\Logging\Plugin; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + /** * Runs when the plugin is activated. */ diff --git a/plugins/wpgraphql-logging/deactivation.php b/plugins/wpgraphql-logging/deactivation.php index 5f135ded..0b7aafd2 100644 --- a/plugins/wpgraphql-logging/deactivation.php +++ b/plugins/wpgraphql-logging/deactivation.php @@ -11,6 +11,10 @@ use WPGraphQL\Logging\Plugin; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + /** * Runs when the plugin is deactivated. */ diff --git a/plugins/wpgraphql-logging/src/Admin/Settings/Templates/admin.php b/plugins/wpgraphql-logging/src/Admin/Settings/Templates/admin.php index c34f170b..6a149892 100644 --- a/plugins/wpgraphql-logging/src/Admin/Settings/Templates/admin.php +++ b/plugins/wpgraphql-logging/src/Admin/Settings/Templates/admin.php @@ -13,6 +13,10 @@ use WPGraphQL\Logging\Admin\Settings\Fields\Tab\BasicConfigurationTab; use WPGraphQL\Logging\Admin\Settings\Fields\Tab\DataManagementTab; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + $wpgraphql_logging_configuration_helper = ConfigurationHelper::get_instance(); $wpgraphql_logging_tabs_config = (array) get_query_var( 'wpgraphql_logging_main_page_config' ); $wpgraphql_logging_current_tab = (string) ( $wpgraphql_logging_tabs_config['current_tab'] ?? '' ); diff --git a/plugins/wpgraphql-logging/src/Admin/View/List/ListTable.php b/plugins/wpgraphql-logging/src/Admin/View/List/ListTable.php index 726557dc..cd7e9028 100644 --- a/plugins/wpgraphql-logging/src/Admin/View/List/ListTable.php +++ b/plugins/wpgraphql-logging/src/Admin/View/List/ListTable.php @@ -10,6 +10,10 @@ use WPGraphQL\Logging\Logger\Database\WordPressDatabaseEntity; use WP_List_Table; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + // Include the WP_List_Table class if not already loaded. if ( ! class_exists( 'WP_List_Table' ) ) { require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; diff --git a/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerNotice.php b/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerNotice.php index 834b3957..94ec035b 100644 --- a/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerNotice.php +++ b/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerNotice.php @@ -11,6 +11,10 @@ use WPGraphQL\Logging\Admin\AdminNotice; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + $wpgraphql_logging_key = AdminNotice::ADMIN_NOTICE_KEY; $wpgraphql_logging_ajax_nonce = wp_create_nonce( $wpgraphql_logging_key ); $wpgraphql_logging_notice = __( "Heads up! While very useful for debugging, the WPGraphQL Logging Plugin can impact your site's performance under heavy usage, so please use it judiciously.", 'wpgraphql-logging' ); diff --git a/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php b/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php index cfb3830e..250d77bd 100644 --- a/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php +++ b/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php @@ -4,6 +4,10 @@ use WPGraphQL\Logging\Admin\ViewLogsPage; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + /** * Log detail view template. * From 9dae02056647b6fd3c888ed2b2e6af8f33c7a18f Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 11:39:08 -0400 Subject: [PATCH 3/5] fix(logging): note why the CSV export closes php://output directly --- .../src/Admin/View/Download/DownloadLogService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wpgraphql-logging/src/Admin/View/Download/DownloadLogService.php b/plugins/wpgraphql-logging/src/Admin/View/Download/DownloadLogService.php index f067a795..0bcecbdb 100644 --- a/plugins/wpgraphql-logging/src/Admin/View/Download/DownloadLogService.php +++ b/plugins/wpgraphql-logging/src/Admin/View/Download/DownloadLogService.php @@ -62,7 +62,7 @@ public function generate_csv( int $log_id ): void { $content = $this->get_content( $log ); $writer->insertOne( $headers ); $writer->insertOne( $content ); - fclose( $output ); + fclose( $output ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose -- Closes the php://output stream, which WP_Filesystem can't handle. exit; } From be94aa600284e5b2f5d55a4dca79fa2fee4d45b0 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 11:40:43 -0400 Subject: [PATCH 4/5] fix(logging): keep the log view template's docblock above its guard --- .../src/Admin/View/Templates/WPGraphQLLoggerView.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php b/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php index 250d77bd..833ab9e2 100644 --- a/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php +++ b/plugins/wpgraphql-logging/src/Admin/View/Templates/WPGraphQLLoggerView.php @@ -4,10 +4,6 @@ use WPGraphQL\Logging\Admin\ViewLogsPage; -if ( ! defined( 'ABSPATH' ) ) { - exit; -} - /** * Log detail view template. * @@ -17,6 +13,10 @@ * * @since 0.0.1 */ + +if ( ! defined( 'ABSPATH' ) ) { + exit; +} ?>
From 9fbe16fe0f48840182027b436d198bb191b4a193 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Fri, 23 Oct 2026 21:39:12 -0400 Subject: [PATCH 5/5] fix(logging): declare GPL-2.0-or-later consistently composer.json used "GPLv2 or later", which isn't a valid SPDX identifier. readme.txt now uses the same "GPLv2 or later" wording as the plugin header. --- plugins/wpgraphql-logging/composer.json | 2 +- plugins/wpgraphql-logging/readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/wpgraphql-logging/composer.json b/plugins/wpgraphql-logging/composer.json index 4f717be2..90f03139 100644 --- a/plugins/wpgraphql-logging/composer.json +++ b/plugins/wpgraphql-logging/composer.json @@ -2,7 +2,7 @@ "name": "wpengine/wpgraphql-logging", "type": "wordpress-plugin", "description": "A plugin for logging WPGraphQL request lifecycle tp help with debugging and performance analysis for WPGraphQL queries.", - "license": "GPLv2 or later", + "license": "GPL-2.0-or-later", "version": "1.0.1", "authors": [ { diff --git a/plugins/wpgraphql-logging/readme.txt b/plugins/wpgraphql-logging/readme.txt index 36b9e2db..aebfd6b2 100644 --- a/plugins/wpgraphql-logging/readme.txt +++ b/plugins/wpgraphql-logging/readme.txt @@ -6,7 +6,7 @@ Tested up to: 6.9 Requires PHP: 8.1.2 Requires WPGraphQL: 2.3.0 Stable tag: 1.0.1 -License: GPL-2.0-or-later +License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html WPGraphQL Logging plugin provides observability and visibility into the GraphQL request and event lifecycle. This allows users to quickly identify and resolve performance issues and bottlenecks within their headless WordPress application.