diff --git a/classes/WpMatomo/Admin/SystemReport.php b/classes/WpMatomo/Admin/SystemReport.php index 7421f2e85..b570eec0d 100644 --- a/classes/WpMatomo/Admin/SystemReport.php +++ b/classes/WpMatomo/Admin/SystemReport.php @@ -1689,15 +1689,20 @@ private function get_plugins_info() { ]; } - $active_plugins = $this->get_actives_plugins(); + $active_plugins_with_version = $this->get_actives_plugins(); - if ( ! empty( $active_plugins ) && is_array( $active_plugins ) ) { + if ( ! empty( $active_plugins_with_version ) && is_array( $active_plugins_with_version ) ) { $rows[] = [ 'name' => 'Active Plugins', - 'value' => count( $active_plugins ), - 'comment' => implode( ' ', $active_plugins ), + 'value' => count( $active_plugins_with_version ), + 'comment' => implode( ' ', $active_plugins_with_version ), ]; + $active_plugins = array_map(function ( $plugin_with_version ) { + $parts = explode( ':', $plugin_with_version ); + return $parts[0]; + }, $active_plugins_with_version); + $used_not_compatible = array_intersect( $active_plugins, $this->not_compatible_plugins ); if ( in_array( 'wp-rocket', $used_not_compatible, true ) ) { if ( defined( 'WP_ROCKET_VERSION' ) && ( version_compare( WP_ROCKET_VERSION, '3.11.5' ) <= 0 ) ) { @@ -1735,6 +1740,17 @@ private function get_plugins_info() { ]; } } + + if ( in_array( 'ninjafirewall', $active_plugins, true ) ) { + $warning = << +

We noticed you are using Matomo with Ninja Firewall. This can result in Matomo cache file changes showing up in Ninja Firewall which likely undesired. + Read our FAQ to learn how to prevent these entries. +

+ +EOF; + echo $warning; + } } $rows[] = [