Amp-wp: Integrate with Site Health Check

Created on 25 Apr 2019  Â·  9Comments  Â·  Source: ampproject/amp-wp

There are some opportunities for the AMP plugin to integrate with the Site Health Check in 5.2, including both status and info:

  • Detect whether loopback requests are working. (Done ✅)
  • Whether persistent object cache is present.
  • Warn when suggested extensions are not installed (#2190).
  • Warn when curl_multi_* functions aren't available (#2423).
  • Flag themes and plugins that are not AMP-compatible. (_Future_)
  • What mode is enabled (native/transitional/reader).
  • What experiences are enabled.
  • Which templates are enabled.
  • Misc AMP plugin settings.
    ...

We should include as much information as is helpful to debug issues that are reported on the forums.

WP Core QA passed

All 9 comments

Detect whether loopback requests are working.

Site Health does that by default because of cron. Perhaps that check is already enough.

See also #2006 (Add warning when a site is not served via HTTPS)

Every warning that we're showing in the plugin admin screen should also be shown in Site Health.

Request To Work On This

Hi @westonruter,
Hope your day's off to a great start.

Could I work on this? Thanks!

Yes, please.

Something that has come up twice recently (1, 2, 3) is a deprecation notice:

PHP Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in ...amp/includes/class-amp-http.php on line 233

We may want to consider adding a Site Health check for outdated ICU version. /cc @schlessera

It was noted by @swissspidy that:

This typically happens when the version of PHP has been compiled with an older version of ICU.

Something else which may end up needing to be tested for is whether zlib output compression is enabled, as apparently this breaks the output buffer processing. Awaiting to confirm. See https://wordpress.org/support/topic/links-and-buttons-are-disabled/#post-12161184

Testing Steps

  1. Go to, /wp-admin/site-health.php, and ensure the 'Status' tab is showing
  2. Expected: there should be 3 AMP pillboxes:

status-here

In the 'Passed tests' section:
passed-tests

  1. Click the 'Info' tab at the top, or go to /wp-admin/site-health.php?tab=debug
  2. Expected: Something like this should display:
    templates-here

  3. Make some changes to the 'AMP Settings' page. For example, disable Pages:
    pages-here

  4. Go back to the Site Health 'Info' tab in Step 3

  5. Expected: the change is reflected there. For example:
    page-here
  6. Repeat steps 5-7 for several different settings

Verified in QA

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swissspidy picture swissspidy  Â·  4Comments

KhalidAlmallahi picture KhalidAlmallahi  Â·  4Comments

westonruter picture westonruter  Â·  4Comments

westonruter picture westonruter  Â·  5Comments

miina picture miina  Â·  5Comments