Support » Plugin: PHP Compatibility Checker » The Future of PHP Compatibility Checker

  • Plugin Author Anthony Burchell

    (@antpb)


    Hello everyone.

    I wanted to take an opportunity to update you all on our progress toward refactoring the PHP Compatibility plugin.

    To recap the current issues in need of updating:

    PHP Compatibility Plugin Structure: PHP Compatibility plugin only provides support up to PHP 7.3 and does not support PHP 7.4 or 8. Major changes between 7.3 and 7.4/8 and the underlying plugin structure require a considerable refactor to support newer versions of PHP as well as older versions that have been supported historically.

    Scanning Issues / Outages: Some (but not all) users of PHP Compatibility plugin experience run-away processes that can cause issues for the server environment where the scan is run. If this happens in a production environment, this can result in a site failure and downtime. The run-away processes are environment-specific (i.e. host specific) and are nearly impossible to predict or fix from the perspective of the plugin. After much research and testing internally and also with many in the WP community, we have concluded that linting using production server resources is the incorrect approach.

    After reviewing both sets of the issues described above we have decided on a refactor we believe will solve both overarching issues and provide a better overall experience for those using PHP Compatibility plugin.

    What we’re working on now:

    We will be refactoring PHP Compatibility plugin to use an endpoint of Tide catered to plugin PHP compatibility in order to provide linting results vs. running PHP linting within the plugin using the resources of the web host where the plugin is being run.

    For those unfamiliar, Tide’s API provides PHP linting results for .org plugins and themes. The linting is performed within an external and controlled hosting environment managed by XWP. Using the Tide API for PHP linting will allow users of the plugin to “offload” the load of PHP linting to Tide and preserve their web server’s resources. This will fix the Scanning Issues / Outages illustrated above.

    Additionally, Tide stores linting results for plugins by version number which means the same plugin doesn’t have to be scanned over and over again. Leveraging cached linting results means that every user of PHP Compatibility will have faster scans and the plugin will greatly reduce the global computing and energy resources it consumes today.

    Finally, because PHP Compatibility will use the Tide API for PHP linting, the PHP Compatibility plugin will inherit the ability to scan new versions of PHP from the Tide API. WP Engine has made a sizeable sponsorship to XWP the maintainers of Tide and we greatly appreciate their contributions on this project in general. If you’d like to contribute to Tide, you can learn more here. Offloading linting via the Tide API, will fix the PHP Versions issue described above (i.e. constant refactoring as PHP advances).

    For clarity, here is a rundown of the current feature set and what we’re moving towards.

    Current Version’s Key Features:

    Scan all plugins and themes using the server resources of the site where the plugin is running.
    Provide linting results for all plugins & themes.

    Refactored Version’s Key Features:

    Query the Tide api for existing linting results for .org plugins and themes. For plugins / themes without existing linting results, use the Tide API’s external resources to lint the .org plugin / theme.
    Provide linting results for .org plugins & themes.

    As for timing, we are in the design phase of this refactor now and will be starting development soon. We have committed resources to this refactor. We will provide updates on timing once we finish the design phase.

    We know that this has been a long time coming and that many of you are frustrated with the slow progress.

    In the meantime, you can also use the PHP Compatibility Library to lint for PHP Compatibility. That is the library that the plugin currently uses and Tide also uses: https://github.com/PHPCompatibility/PHPCompatibility

    In any case, we hope this update is helpful and we look forward to the refactor delivering much faster support for new versions of PHP, zero downtime issues for anyone, and a faster experience for all.

    Best regards,
    Anthony Burchell

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Anthony Burchell

    (@antpb)

    Thanks to the amazing @jeffpaul for pointing out, I missed the link in the post above sharing where you can learn more about contributing to the project. You can find that information and more here: https://www.wptide.org/#contributing

    Subrata Sarkar

    (@subrataemfluence)

    “The plugin/theme was skipped as it was too large to scan before the server killed the process.”

    What is the exact reason for this error message? What is the workaround for this? Is the process really being killed or this is a kind of default fallback message which comes from the checker plugin if any ERROR related to PHPComatibility is encountered? If so, there should be a proper message rather than just showing “Unknown”!

    I am getting this for a number of plugins installed in my site. Is it safe to update to a newer PHP version? If not, how can I resolve this problem?

    On another note, I was expecting a way to control select one or multiple plugins rather than running the script on all/active plugins and themes. But as of now, there is no no option like this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.