WordPress / plugin-check

A repository for the new Plugin Check plugin from the WordPress Performance and Plugins Team.
https://wordpress.org/plugins/plugin-check/
GNU General Public License v2.0
263 stars 53 forks source link

Create Direct_DB_Queries_Check #29

Closed mehulkaklotar closed 10 months ago

mehulkaklotar commented 1 year ago

Description

Checks for direct database queries within the plugin codebase. These should be avoided as these queries can negatively impact performance and bypass inbuilt caches. This sniff will evaluate $wpdb usage and warn the developer about its use. This will use the existing WordPress.DB.DirectDatabaseQuery sniff in the WordPress Coding Standards.

Acceptance Criteria

Tests Coverage

vishalkakadiya commented 1 year ago

I'm working on updating AC for this issue. Thank you! CC @eclarke1 @jjgrainger

vishalkakadiya commented 1 year ago

@felixarntz I have updated AC for this, and it is now ready for review. Thanks! 🙂