Amp-wp: Wizard Step: Plugin compatibility scanning

Created on 14 May 2020  路  12Comments  路  Source: ampproject/amp-wp

Feature description

As part of the onboarding the AMP plugin will check for plugin and theme compatibility compatibility issues, and recommend actions based on what it finds.


_Do not alter or remove anything below. The following sections will be managed by moderators only._

Acceptance criteria

  • If there are no errors caused by the theme or plugins, then we could recommend Standard mode.
  • If there are no errors caused by the theme but there are errors caused by plugins, we could recommend Transitional mode, along with suggesting for the offending plugins to be turned off in AMP responses.
  • If there are errors caused by both the theme and plugins, then we can recommend Reader mode along with the plugin suppression suggestion.

  • If it finds incompatible plugins it will show list of plugins that are causing problems, and ask user if they want to turn off the plugins.

Note: We may disable plugins specifically when generating AMP pages (need clarification on this)

Implementation brief

QA testing instructions

Demo

Changelog entry

Groomed P0 UX UX Phase 2 Validation UX

Most helpful comment

Also, with #1756 when using WP-Cron, we'll want to provide a summary of the most recent site scan results when the user first lands on the Settings screen. Then they can re-scan if they want to get more up-to-date results.

All 12 comments

This step is not going to be about plugin compatibility scanning only. It will also check for the theme compatibility. If a theme is generating AMP validation errors, then this will be a signal for which template mode will be recommended to the user. For example:

  • If there are no errors caused by the theme or plugins, then we could recommend Standard mode.
  • If there are no errors caused by the theme but there are errors caused by plugins, we could recommend Transitional mode, along with suggesting for the offending plugins to be turned off in AMP responses.
  • If there are errors caused by both the theme and plugins, then we can recommend Reader mode along with the plugin suppression suggestion.

If it finds incompatible plugins it will show list of plugins that are causing problems, and ask user if they want to turn off the plugins.

Turn them off specifically when generating AMP pages.

What about scenarios where there are theme errors, but no plugin errors?

My Sketches - 2020-07-07 08 20 49

Yes, if there are theme errors, then we recommend Reader mode.

If there are no theme errors but there are plugin errors, then Transitional mode can recommended (especially for technical users).

If there are no theme errors nor plugin errors, then Standard mode can be recommended (especially for technical users).

I believe the scenarios are captured in the AMP Copy Configuration Table doc.

Note we'll need to incorporate site scanning into the settings screen as well.

This should make the recommendations consistent between the wizard and settings screen. See https://github.com/ampproject/amp-wp/issues/4990#issuecomment-659645972.

There needs to be a button on the Settings screen to initiate a re-scan.

Also, with #1756 when using WP-Cron, we'll want to provide a summary of the most recent site scan results when the user first lands on the Settings screen. Then they can re-scan if they want to get more up-to-date results.

Using this task as the jumping-off point for the various site scanning tasks. I kinda think https://github.com/ampproject/amp-wp/issues/4795 can be closed in favor of this one, but I'll hold off for now.

@jwold Assigning this to you alongside myself for the design aspects. It'll probably be some days before I start on building the UI for this, but I think I'll be there in within 1-2 weeks.

In addition to showing the most recent Site Scan results on the Settings screen and providing the ability to trigger a scan from there, there's an opportunity here for integration with Plugin Suppression. So in the Wizard for example, after the site scan has completed, there should be a screen that shows the site scan results, and when there are plugins causing validation errors, provide a way to easily suppress them from AMP responses at that point. This will make Plugin Suppression part of the onboarding flow, whereas currently it is relegated to the Advanced section. The onboarding wizard should take the site scan results to suggest which template mode is best based on the site scan results, but then also which plugins should be suppressed based on the site scan results. Eventually we could also suggest alternatives for plugins that are AMP-compatible.

I kinda think #4795 can be closed in favor of this one, but I'll hold off for now.

Actually, there is one key piece that is distinct for that issue. See https://github.com/ampproject/amp-wp/issues/4795#issuecomment-674573018.

I just realized another aspect of plugin scanning which will be important. In the same way we will do for themes in #4795, we need to check which post types, shortcodes, blocks, etc which are registered by each plugin. We can determine this by making a request to some REST API endpoint that lists those entities along with a query var that allows us to force all plugins other than the one supplied in a query var to be suppressed. We can then infer what entities are introduced by each plugin. This information will be critical to present to the user when we suggest plugins for suppression or when we list plugins on the Plugin Suppression table. Users need to know what side effects there will be for suppressing a plugin as much as possible.

Was this page helpful?
0 / 5 - 0 ratings