• redsand

    (@redsand)


    Ran some tests on a few more fairly common plugins, and found that the ManageWP Worker plugin is getting a false positive.

    Here’s the clip from the report:

    
    FILE: /XXXXXX/wp-content/plugins/worker/functions.php
    --------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------
     402 | WARNING | INI directive 'safe_mode' is deprecated since PHP 5.3 and removed since PHP 5.4.
    --------------------------------------------------------------------------------------------------
    
    FILE: /XXXXXX/wp-content/plugins/worker/src/S3/Client.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      395 | WARNING | Method name "S3_Client::__triggerError" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1660 | WARNING | Method name "S3_Client::__getCloudFrontInvalidationBatchXML" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1743 | WARNING | Method name "S3_Client::__getCloudFrontDistributionConfigXML" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1785 | WARNING | Method name "S3_Client::__parseCloudFrontDistributionConfig" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1844 | WARNING | Method name "S3_Client::__getCloudFrontResponse" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1878 | WARNING | Method name "S3_Client::__getMIMEType" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1925 | WARNING | Method name "S3_Client::__getTime" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1955 | WARNING | Method name "S3_Client::__getSignature" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     1971 | WARNING | Method name "S3_Client::__getHash" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /XXXXXX/wp-content/plugins/worker/src/S3/Request.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
     423 | WARNING | Method name "S3_Request::__sortMetaHeadersCmp" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     447 | WARNING | Method name "S3_Request::__responseWriteCallback" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     465 | WARNING | Method name "S3_Request::__dnsBucketName" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
     494 | WARNING | Method name "S3_Request::__responseHeaderCallback" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /XXXXXX/wp-content/plugins/worker/src/MMB/Backup.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------
     4277 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
    ---------------------------------------------------------------------------------------------------------------
    
    FILE: /XXXXXX/wp-content/plugins/worker/src/MWP/IncrementalBackup/Database/MysqlConnection.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 11 ERRORS AFFECTING 9 LINES
    ----------------------------------------------------------------------------------------------------------------------------
     33 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     39 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     43 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     43 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     46 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     47 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     56 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     58 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     62 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     62 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     75 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
    ----------------------------------------------------------------------------------------------------------------------------
    
    FILE: /XXXXXX/wp-content/plugins/worker/src/MWP/IncrementalBackup/Database/MysqlStatement.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------
     29 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
     56 | ERROR | Extension 'mysql_' is deprecated since PHP 5.5 and removed since PHP 7.0 - use mysqli instead.
    ---------------------------------------------------------------------------------------------------------------------------
    
    FILE: /XXXXXX/wp-content/plugins/worker/src/MWP/Backup/MysqlDump/DumpFactory.php
    --------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------
     56 | WARNING | INI directive 'safe_mode' is deprecated since PHP 5.3 and removed since PHP 5.4.
    --------------------------------------------------------------------------------------------------------------
    

    Please fix. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jason

    (@jcross)

    The plugin relies completely on the PHPCompatibility project (https://github.com/wimg/PHPCompatibility) for error reporting. Any false positives and so forth should be posted as an issue there.

    Thread Starter redsand

    (@redsand)

    @jcross

    The plugin relies completely on the PHPCompatibility project…

    That’s the main problem.

    Relying solely on one library is not an intelligent solution.

    Any false positives and so forth should be posted as an issue there.

    That’s passing the buck, don’t you think? This is your plugin, not theirs.

    You make the choices as to what method is used for detection.

    Make adaptations.

    Add logic on a separate layer on top of the base library.

    To make it accurate, you need an algorithm, not a library.

    No one said you had to rely on one library.

    • This reply was modified 8 years ago by redsand.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘FALSE POSITIVE: Showing ManageWP Worker as not PHP 7 Compatible’ is closed to new replies.