The AMP plugin provides a PHP-port of the AMP Optimizer as a library providing automated server-side optimizations of AMP pages, including a variety of performance best practices for AMP. These optimizations improve key performance metrics such as the very important Last Contentful Paint (LCP) performance metric when AMP pages are served from origin.
In essence, the AMP optimizer implementation corresponds to a Transformation Engine (TE), which receives a regular (i.e. unoptimized) AMP page, and applies a serial pipeline of Transformers (i.e. optimizations). The TE then outputs an optimized AMP page, ready to be served to users and meet the desired CWV thresholds.