Description
- PHP-registered field group count is always 0. The Site Health data counts PHP field groups with
'PHP' === $field_group['local'], but acf_add_local_field_group() registers groups with 'local' => 'php' (lowercase). The comparison never matches. The live class has this bug at src/Site_Health/Site_Health.php:520; the same comparison exists in the legacy includes/class-acf-site-health.php:340.
includes/class-acf-site-health.php appears to be dead code. The plugin only instantiates SCF\Site_Health\Site_Health from src/. The legacy class additionally treats acf_get_post_types() / acf_get_taxonomies() (which return name strings) as arrays ($post_type['local'] at :253-254), making its counts meaningless — further evidence it is unused and could be removed rather than fixed.
Reproduction
Repro test in #450: tests/php/includes/test-class-acf-site-health.php (php_field_groups asserted '0' with a PHP-registered group present, carrying the NOTE comment).
Suggested fix
Case-insensitive compare (or compare against 'php') in src/Site_Health/Site_Health.php; remove the legacy includes/class-acf-site-health.php after confirming nothing external instantiates it.
Found during the 2026-06 test campaign (see PR #450).
Description
'PHP' === $field_group['local'], butacf_add_local_field_group()registers groups with'local' => 'php'(lowercase). The comparison never matches. The live class has this bug atsrc/Site_Health/Site_Health.php:520; the same comparison exists in the legacyincludes/class-acf-site-health.php:340.includes/class-acf-site-health.phpappears to be dead code. The plugin only instantiatesSCF\Site_Health\Site_Healthfromsrc/. The legacy class additionally treatsacf_get_post_types()/acf_get_taxonomies()(which return name strings) as arrays ($post_type['local']at:253-254), making its counts meaningless — further evidence it is unused and could be removed rather than fixed.Reproduction
Repro test in #450:
tests/php/includes/test-class-acf-site-health.php(php_field_groupsasserted'0'with a PHP-registered group present, carrying the NOTE comment).Suggested fix
Case-insensitive compare (or compare against
'php') insrc/Site_Health/Site_Health.php; remove the legacyincludes/class-acf-site-health.phpafter confirming nothing external instantiates it.Found during the 2026-06 test campaign (see PR #450).