| @@ -60,10 +60,11 @@ | ||
| 60 | 60 | // Provider-neutral: the panel runs whichever provider the site has |
| 61 | 61 | // configured (PageSpeed Insights by default, no API key needed). |
| 62 | 62 | // The Hub-run test has its own copy and is gated behind |
| 63 | 63 | // hub_speed_test_enabled(), so this line must not promise it. |
| 64 | - 'description' => __( 'Run a PageSpeed Insights or GTmetrix audit from the dashboard and keep the history next to your TTFB benchmark.', 'xspeed' ), | |
| 64 | + 'description' => __( 'Run a PageSpeed Insights or GTmetrix test and keep a history of the scores.', 'xspeed' ), | |
| 65 | 65 | 'custom_panel' => 'ScorePanel', |
| 66 | + 'group' => 'insights', | |
| 66 | 67 | ); |
| 67 | 68 | } |
| 68 | 69 | |
| 69 | 70 | public function settings_schema(): array { |
| @@ -79,9 +80,9 @@ | ||
| 79 | 80 | // run turns this on rather than refusing (#425). What it |
| 80 | 81 | // still guards is everything that is NOT a Test press — an |
| 81 | 82 | // optimize run measuring its own effect, for instance. |
| 82 | 83 | // Switch it off (REST/CLI) and nothing contacts a provider. |
| 83 | - 'description' => __( 'Turns on automatically the first time you run a speed test — the button press is the consent. Switch it off to stop every feature, including optimize runs, from contacting a score provider.', 'xspeed' ), | |
| 84 | + 'description' => __( 'Turns on the first time you run a speed test. Switch it off and no feature, not even an optimize run, contacts a test provider.', 'xspeed' ), | |
| 84 | 85 | // No dashboard control: the Test press manages it, and a |
| 85 | 86 | // visible switch that gates a button elsewhere was the |
| 86 | 87 | // confusion #425 removed. Hidden fields are skipped by the |
| 87 | 88 | // panel renderer and by settings search. |
| @@ -94,19 +95,20 @@ | ||
| 94 | 95 | 'option_labels' => array( |
| 95 | 96 | 'psi' => 'PageSpeed Insights', |
| 96 | 97 | 'gtmetrix' => 'GTmetrix', |
| 97 | 98 | ), |
| 98 | - 'label' => __( 'Provider', 'xspeed' ), | |
| 99 | - 'description' => __( 'PageSpeed Insights works without an API key. GTmetrix requires one.', 'xspeed' ), | |
| 99 | + 'label' => __( 'Test provider', 'xspeed' ), | |
| 100 | + 'description' => __( 'PageSpeed Insights works without an API key. GTmetrix needs one.', 'xspeed' ), | |
| 100 | 101 | ), |
| 101 | 102 | 'psi_api_key' => array( |
| 102 | 103 | 'type' => 'secret', |
| 103 | 104 | 'default' => '', |
| 104 | 105 | 'label' => __( 'PageSpeed API key (optional)', 'xspeed' ), |
| 105 | - 'description' => __( 'Only needed if you hit Google\'s anonymous rate limit. Free from cloud.google.com.', 'xspeed' ), | |
| 106 | + 'description' => __( 'Only needed if Google starts refusing tests without a key. You can get a free key at cloud.google.com.', 'xspeed' ), | |
| 106 | 107 | // Rendered as a trailing "Check the documentation" link — |
| 107 | 108 | // descriptions themselves are plain text (#111). |
| 108 | 109 | 'doc_url' => 'https://xspeedcache.com/docs/pagespeed-insights-integration/', |
| 110 | + 'advanced' => true, | |
| 109 | 111 | 'dependsOn' => array( |
| 110 | 112 | 'field' => 'provider', |
| 111 | 113 | 'value' => 'psi', |
| 112 | 114 | ), |
| @@ -114,9 +116,9 @@ | ||
| 114 | 116 | 'gtmetrix_api_key' => array( |
| 115 | 117 | 'type' => 'secret', |
| 116 | 118 | 'default' => '', |
| 117 | 119 | 'label' => __( 'GTmetrix API key', 'xspeed' ), |
| 118 | - 'description' => __( 'Required — GTmetrix has no anonymous mode. Found in your GTmetrix account settings.', 'xspeed' ), | |
| 120 | + 'description' => __( 'GTmetrix does not run tests without a key. Find it in your GTmetrix account settings.', 'xspeed' ), | |
| 119 | 121 | 'dependsOn' => array( |
| 120 | 122 | 'field' => 'provider', |
| 121 | 123 | 'value' => 'gtmetrix', |
| 122 | 124 | ), |
| @@ -130,10 +132,10 @@ | ||
| 130 | 132 | 'default_strategy' => array( |
| 131 | 133 | 'type' => 'enum', |
| 132 | 134 | 'default' => 'mobile', |
| 133 | 135 | 'options' => array( 'mobile', 'desktop' ), |
| 134 | - 'label' => __( 'Strategy', 'xspeed' ), | |
| 135 | - 'description' => __( 'PageSpeed Insights only. Mobile is what Google ranks on.', 'xspeed' ), | |
| 136 | + 'label' => __( 'Device', 'xspeed' ), | |
| 137 | + 'description' => __( 'Test as a phone or a desktop visitor. Google ranks sites on the mobile result.', 'xspeed' ), | |
| 136 | 138 | 'dependsOn' => array( |
| 137 | 139 | 'field' => 'provider', |
| 138 | 140 | 'value' => 'psi', |
| 139 | 141 | ), |