• “PHP Compatibility Checker” was used to scan the following plugins (there may be more later) ;
    ManageWP – Worker
    Postie
    Both got reported as warnings and some errors, because they used code of older versions of PHP.
    However, although they contain older commands, those commands are in theportions of code that get used if older PHP versions are detected by the plugin.

    So some suggestions for features and functions
    It would be very useful when doing a scan, to include the search for signature type code that does the following ;
    a) detect PHP versions
    b) makes decisions about what to do if a version is detected
    c) encases respective code for respective versions

    Additional Features ;
    The scan report could note that the plugin is also attempting to be compatible with the detected other versions.
    The user may choose to set the scan to actually check the compatibility with the other versions that the plugin is attempting to be compatible with, or not.
    The scan could make a note in the report that the plugin authors are showing extra effort in maintaining more universally applicable code.
    The scan may also check the accuracy of the code for (a,b,c) above in doing their tasks (there may be standard procedures for this).

Viewing 1 replies (of 1 total)
  • Thread Starter MKSnMKS

    (@mksnmks)

    Re – “Category Posts in Custom Menu” Plugin

    I looks like “PHP7 Compatibility” looks for code which is not compatible with the version of PHP, that compatibility is being checked for, and if it finds non version code, then will warn of incompatibility.

    How ever, there are many plugins that are designed to work with a range of PHP versions. Therefore they have code for various versions.
    And this will cause them to cause “PHP7 Compatibility” to make warnings.

    “PHP7 Compatibility” could do with an improvement by including the ability to detect that a plugin is designed for compatibility multiple PHP versions.
    It could do this by searching for code that ;
    a) detects the version of PHP
    and
    b) makes decisions on what to do based on the PHP version detected.
    These would be treated as “signatures” of a plugin that is “probably” compatible even though it contains code for other versions (though still not certain).

    It might be handy to request (or make available, a means of supplying) the portions of code that do the above functions, to the “PHP7 Compatibility” plugin project, so they can work on building this additional detection capability in to “PHP7 Compatibility”.

    Thank you

Viewing 1 replies (of 1 total)
  • The topic ‘PHP7 Compatibility – scan for code that is used for backward compatibility’ is closed to new replies.