Visual Studio CodeにPHP_CodeSnifferを利用してWordPressのコーディング規約を自動的にチェックしていきます。
PHP_CodeSnifferのインストール
インストール方法は以下の記事で紹介しています。
https://monzen-creative.com/381/
phpcsプラグインをインストール
「拡張機能」から「phpcs」を検索し、VS Codeにphpcsプラグインをインストールします。

phpcsのパスを入れる
phpcsの設定を開き、phpcs: Executable Pathの項目に以下のようにphpcsのパスを追記します。
/Users/{USERNAME}/.composer/vendor/squizlabs/php_codesniffer/bin/phpcs
コーディング規約をWordPressに変更する
コーディング規約をWordPressに変更します。
[Code] > [基本設定] > [設定] > [ワークスペース タブ] > [拡張機能] > [PHP CodeSniffer] > [Standard] > [Setting.json]を押下します。

setting.jsonを編集
“phpcs.standard”の初期値は空白になっていますので、”WordPress”に変更します。
{
"phpcs.standard": "WordPress"
}