class-insight-query.php

Insight query read model for cached telemetry and PageSpeed results.

Source includes/Insight/class-insight-query.php1 min readPart of Performance Optimisation

includes/Insight/class-insight-query.php

Insight query read model for cached telemetry and PageSpeed results.

Namespace: PerformanceOptimise\\Inc · Lines: 74

Class Insight_Query

Read-only adapter for the plugin\’s stored insight results.

Source: includes/Insight/class-insight-query.php, line 25

final class Insight_Query

Tags: @since NEXT

publicstatic get_telemetry()

public static function get_telemetry(string $url)

Read a cached telemetry result for a URL.

ParameterTypeDefaultDescription
$urlstring—Scanned URL.

Return: array|false — Cached telemetry payload, or false when absent.

Tags: @since NEXT

Source: includes/Insight/class-insight-query.php, line 34

publicstatic get_pagespeed()

public static function get_pagespeed(string $url, string=\'mobile\' $strategy)

Read the raw PageSpeed result for a URL and strategy.

ParameterTypeDefaultDescription
$urlstring—Scanned URL.
$strategystring=\'mobile\'—Device strategy.

Return: array|false — Prepared PageSpeed result, or false when absent.

Tags: @since NEXT

Source: includes/Insight/class-insight-query.php, line 49

publicstatic get_pagespeed_report()

public static function get_pagespeed_report(string $url, string=\'mobile\' $strategy)

Read a PageSpeed result with deterministic suggestion augmentation.

ParameterTypeDefaultDescription
$urlstring—Scanned URL.
$strategystring=\'mobile\'—Device strategy.

Return: array|false — Augmented PageSpeed result, or false when absent.

Tags: @since NEXT

Source: includes/Insight/class-insight-query.php, line 64