name: ⏱️ Google PageSpeed
category: social
description: |
  This plugin displays performance statistics of a website.

  It uses [Google's PageSpeed API](https://developers.google.com/speed/docs/insights/v5/get-started) (same as [web.dev](https://web.dev)), see [performance scoring](https://web.dev/performance-scoring/) and [score calculator](https://googlechrome.github.io/lighthouse/scorecalc/) for more informations about results.
disclaimer: |
  This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Google PageSpeed](https://pagespeed.web.dev/).
  All product and company names are trademarks™ or registered® trademarks of their respective holders.
examples:
  +PageSpeed scores: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.pagespeed.svg
  PageSpeed scores with detailed report: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.pagespeed.detailed.svg
  PageSpeed scores with a website screenshot: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.pagespeed.screenshot.svg
index: 0
supports:
  - user
  - organization
  - repository
scopes: []
inputs:

  plugin_pagespeed:
    description: |
      Enable pagespeed plugin
    type: boolean
    default: no

  plugin_pagespeed_token:
    description: |
      PageSpeed token

      > ⚠️ While not mandatory, it is strongly advised pass a token to avoid triggering the rate limiter. See [PageSpeed documentation](https://developers.google.com/speed/docs/insights/v5/get-started) for more informations.
    type: token
    default: ""
    extras:
      - metrics.api.google.pagespeed

  plugin_pagespeed_url:
    description: |
      Audited website
    type: string
    default: .user.website
    preset: no

  plugin_pagespeed_detailed:
    description: |
      Detailed results

      The following additional stats will be displayed:
      - First Contentful Paint
      - Speed Index
      - Largest Contentful Paint
      - Time to Interactive
      - Total Blocking Time
      - Cumulative Layout Shift
    type: boolean
    default: no

  plugin_pagespeed_screenshot:
    description: |
      Website screenshot

      Significantly increase filesize
    type: boolean
    default: no

  plugin_pagespeed_pwa:
    description: |
      PWA Status
    type: boolean
    default: no