# solid-performance/1.1.0/src/Performance/Telemetry/Health_Data.php

Solid Performance – Your No-Code Caching, Performance, &amp; Page Speed Solution, version 1.1.0. 72 lines.

- Page: https://pluginprobe.com/plugins/solid-performance/1.1.0/code/src/Performance/Telemetry/Health_Data.php
- Raw: https://pluginprobe.com/plugins/solid-performance/1.1.0/raw/src/Performance/Telemetry/Health_Data.php
- Modified: 2024-08-12T20:38:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/solid-performance/1.1.0/code/src/Performance/Telemetry/Health_Data.php#L10-L20`.

```php
<?php
/**
 * Handles adding a new section to the site health data screen.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */

namespace SolidWP\Performance\Telemetry;

/**
 * Handles adding a new section to the site health data screen.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */
class Health_Data {

	/**
	 * Adds a new Solid Performance section to site health data.
	 *
	 * @since 0.1.0
	 *
	 * @filter debug_information
	 *
	 * @param array $info The array of site health data.
	 *
	 * @return array
	 */
	public function add_summary_to_telemetry( array $info ): array {
		$page_cache          = swpsp_config_get( 'page_cache' );
		$page_cache_status   = $page_cache['enabled'] ? esc_html__( 'Enabled', 'solid-performance' ) : esc_html__( 'Disabled', 'solid-performance' );
		$cache_dir_writeable = swpsp_direct_filesystem()->is_writable( $page_cache['cache_dir'] ) ? esc_html__( 'Writable', 'solid-performance' ) : esc_html__( 'Not Writable', 'solid-performance' );
		$debug_mode_status   = $page_cache['debug'] ? esc_html__( 'Enabled', 'solid-performance' ) : esc_html__( 'Disabled', 'solid-performance' );
		$exclusion_count     = count( $page_cache['exclusions'] );

		$info['solid-performance'] = [
			'label'  => esc_html__( 'Solid Performance', 'solid-performance' ),
			'fields' => [
				'page_cache_status'        => [
					'label' => esc_html__( 'Page Cache', 'solid-performance' ),
					'value' => $page_cache_status,
					'debug' => strtolower( $page_cache_status ),
				],
				'cache_directory'          => [
					'label' => esc_html__( 'Cache Directory', 'solid-performance' ),
					'value' => $page_cache['cache_dir'],
					'debug' => $page_cache['cache_dir'],
				],
				'cache_directory_writable' => [
					'label' => esc_html__( 'Cache Directory Permissions', 'solid-performance' ),
					'value' => $cache_dir_writeable,
					'debug' => strtolower( $cache_dir_writeable ),
				],
				'debug_mode'               => [
					'label' => esc_html__( 'Debug Mode', 'solid-performance' ),
					'value' => $debug_mode_status,
					'debug' => strtolower( $debug_mode_status ),
				],
				'exclusion_count'          => [
					'label' => esc_html__( 'Number of custom exclusions', 'solid-performance' ),
					'value' => $exclusion_count,
				],
			],
		];

		return $info;
	}
}

```
