{
"resource": "/Users/wraithkenny/Projects/dev/some-theme/tgmpa/class-tgm-plugin-activation.php",
"owner": "_generated_diagnostic_collection_name_#3",
"severity": 8,
"message": "An error occurred during processing; checking has been aborted. The error message was: file_get_contents(https://api.github.com/repos/TGMPA/TGM-Plugin-Activation/releases/latest): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden\\r\\n in /Users/wraithkenny/Projects/dev/vendor/wptrt/wpthemereview/WPThemeReview/Sniffs/Plugins/CorrectTGMPAVersionSniff.php on line 482\n(Internal.Exception)",
"source": "phpcs",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 2
}
There are several problems with the update_current_version() function. (WPThemeReview/Sniffs/Plugins/CorrectTGMPAVersionSniff.php)
It's kind of a huge waste to request and parse an external file just to get a version number that hasn't changed in years,
It takes forever, and means that on-type error checking slows to a crawl, and crashes after the rate limit,
Probably dangerous, or at least looks scary. No one is expecting their phpcs to be randomly requesting downloads of external files and potential execution on each and every run.
There is no actual need to retain this function. It should be replaced with '2.6.1' and if TGMPA ever updates, it should be updated in the sniff.
There are several problems with the
update_current_version()
function. (WPThemeReview/Sniffs/Plugins/CorrectTGMPAVersionSniff.php)There is no actual need to retain this function. It should be replaced with '2.6.1' and if TGMPA ever updates, it should be updated in the sniff.