What problem would the enhancement address for VIP?
Since WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn checks for post__not_in, we should also check for the 'exclude' parameter being passed into get_posts() which in turn calls post__not_in.
Describe the solution you'd like
What code should be reported as a violation?
get_posts( [ 'exclude' => $post_ids ] ); // Warning.
What could should not be reported as a violation?
Additional context
Codex: https://developer.wordpress.org/reference/functions/get_posts/
What problem would the enhancement address for VIP?
Since
WordPressVIPMinimum.Performance.WPQueryParams.PostNotInchecks forpost__not_in, we should also check for the'exclude'parameter being passed intoget_posts()which in turn callspost__not_in.Describe the solution you'd like
What code should be reported as a violation?
What could should not be reported as a violation?
Additional context
Codex: https://developer.wordpress.org/reference/functions/get_posts/