Description
During scans the scanner hits PHPs max execution time and carries on regardless, so results may be unreliable.
I tried messing with registering a shutdown function but thats a bit 'hacky'.
Setting the max execution via ini_set is also an option but a lot of hosts disable that function.
Maybe add a notice to the plugin page somewhere if the users 'max_execution_time' is < 90s
Heres the debug I got in my log
[08-Jul-2016 20:26:14 UTC] WPE PHP Compatibility: startScan: 1 [08-Jul-2016 20:26:14 UTC] WPE PHP Compatibility: lock: 1 [08-Jul-2016 20:26:14 UTC] WPE PHP Compatibility: scan status: [08-Jul-2016 20:26:14 UTC] WPE PHP Compatibility: Generating directory list. [08-Jul-2016 20:26:14 UTC] WPE PHP Compatibility: 3 plugins left to process. [08-Jul-2016 20:26:14 UTC] WPE PHP Compatibility: Processing: PageLines Framework [08-Jul-2016 20:26:14 UTC] WPE PHP Compatibility: Attempted scan count: 1 [08-Jul-2016 20:26:18 UTC] WPE PHP Compatibility: Processing: PageLines Section Magazine [08-Jul-2016 20:26:18 UTC] WPE PHP Compatibility: Attempted scan count: 1 [08-Jul-2016 20:26:19 UTC] WPE PHP Compatibility: Processing: PageLines Platform 5 [08-Jul-2016 20:26:19 UTC] WPE PHP Compatibility: Attempted scan count: 1 [08-Jul-2016 20:27:09 UTC] PHP Fatal error: Maximum execution time of 55 seconds exceeded in /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php on line 2308 [08-Jul-2016 20:27:09 UTC] PHP Stack trace: [08-Jul-2016 20:27:09 UTC] PHP 1. {main}() /Users/pross/Repos/WordPress/wp-admin/admin-ajax.php:0 [08-Jul-2016 20:27:09 UTC] PHP 2. do_action() /Users/pross/Repos/WordPress/wp-admin/admin-ajax.php:91 [08-Jul-2016 20:27:09 UTC] PHP 3. call_user_func_array:{/Users/pross/Repos/WordPress/wp-includes/plugin.php:524}() /Users/pross/Repos/WordPress/wp-includes/plugin.php:524 [08-Jul-2016 20:27:09 UTC] PHP 4. WPEngine_PHPCompat->start_test() /Users/pross/Repos/WordPress/wp-includes/plugin.php:524 [08-Jul-2016 20:27:09 UTC] PHP 5. WPEPHPCompat->start_test() /Users/pross/Repos/phpcompat/wpengine-phpcompat.php:90 [08-Jul-2016 20:27:09 UTC] PHP 6. WPEPHPCompat->process_file() /Users/pross/Repos/phpcompat/src/wpephpcompat.php:171 [08-Jul-2016 20:27:09 UTC] PHP 7. PHP_CodeSniffer_CLI->process() /Users/pross/Repos/phpcompat/src/wpephpcompat.php:220 [08-Jul-2016 20:27:09 UTC] PHP 8. PHP_CodeSniffer->processFiles() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php:912 [08-Jul-2016 20:27:09 UTC] PHP 9. PHP_CodeSniffer->processFile() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer.php:629 [08-Jul-2016 20:27:09 UTC] PHP 10. PHP_CodeSniffer->_processFile() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer.php:1739 [08-Jul-2016 20:27:09 UTC] PHP 11. PHP_CodeSniffer_File->start() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer.php:1861 [08-Jul-2016 20:27:09 UTC] PHP 12. PHP_CodeSniffer_File->_parse() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php:474 [08-Jul-2016 20:27:09 UTC] PHP 13. PHP_CodeSniffer_File::tokenizeString() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php:695 [08-Jul-2016 20:27:09 UTC] PHP 14. PHP_CodeSniffer_File::_createScopeMap() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php:1448 [08-Jul-2016 20:27:09 UTC] PHP 15. PHP_CodeSniffer_File::_recurseScopeMap() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php:1863 [08-Jul-2016 20:27:09 UTC] PHP 16. PHP_CodeSniffer_File::_recurseScopeMap() /Users/pross/Repos/phpcompat/vendor/squizlabs/php_codesniffer/CodeSniffer/File.php:2232 [08-Jul-2016 20:27:16 UTC] WPE PHP Compatibility: startScan: [08-Jul-2016 20:27:16 UTC] WPE PHP Compatibility: lock: [08-Jul-2016 20:27:16 UTC] WPE PHP Compatibility: scan status: 1 [08-Jul-2016 20:27:16 UTC] WPE PHP Compatibility: 1 plugins left to process. [08-Jul-2016 20:27:16 UTC] WPE PHP Compatibility: Processing: PageLines Platform 5 [08-Jul-2016 20:27:16 UTC] WPE PHP Compatibility: Attempted scan count: 2 [08-Jul-2016 20:28:08 UTC] WPE PHP Compatibility: Scan finished.