Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add performance related rules and no unlimited queries sniff #41

Merged
merged 3 commits into from
Apr 17, 2023

Conversation

pabamato
Copy link
Contributor

Description of the Change

  • Add missing DB and performance related sniffs
  • Add custom sniff to flag queries using -1 (unlimited) for posts_per_page

Closes # #40

How to test the Change

Changelog Entry

Added - PostsPerPageNoUnlimited sniff. Detect usage of -1 on posts_per_page
This feature has been removed from WordPress and VIP-go CS: WordPress/WordPress-Coding-Standards#1531 (review)

Added - Import the following rules from WordPress CS:
WordPress.DB.PreparedSQL, WordPress.DB.DirectDatabaseQuery, WordPress.DB.SlowDBQuery

Credits

Checklist:

  • [ x] I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@tlovett1 tlovett1 merged commit 4c4bc38 into master Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants