Non_Blocking_Scripts_Check
: Warn about enqueued scripts that use neither defer
nor async
#467
Labels
Checks
Audit/test of the particular part of the plugin
[Team] Performance
Issues owned by Performance Team
[Type] Enhancement
A suggestion for improvement of an existing feature
Milestone
As proposed by @felixarntz in #443, this check would help encourage user to switch to non blocking enqueues.
Potentially we could also accept a blocking script as long as it's
$in_footer
. But it would definitely warn about a blocking in head script.@swissspidy pointed out that The corresponding PHPCS sniff does not yet support the new $args param we added in 6.3. It was also indicated that the sniff might actually be removed because it's harder to detect. So probably needs to be a runtime check.
The text was updated successfully, but these errors were encountered: