siteurl, $s->home ) ); $hs = Text::hostOf( $s->siteurl ); $hh = Text::hostOf( $s->home ); // "www." counts as the same host, as in control 6 (orchestrator decision 2026-10-23). if ( '' !== $hs && '' !== $hh && ! Text::isSiteHost( $hs, array( $hh ) ) ) { $out[] = Finding::make( 'settings_hosts_differ', 'siteurl, home', array( $hs, $hh ) ); } $pairs = array( array( 'WP_HOME', $s->wpHome, 'home', $s->home ), array( 'WP_SITEURL', $s->wpSiteurl, 'siteurl', $s->siteurl ), ); foreach ( $pairs as $p ) { if ( null !== $p[1] && rtrim( $p[1], '/' ) !== rtrim( $p[3], '/' ) ) { $out[] = Finding::make( 'settings_constant_differs', $p[0], array( $p[0], $p[1], $p[2], $p[3] ) ); } } if ( $s->usersCanRegister ) { $caps = array_values( array_intersect( Assumptions::CAPS, $ctx->roleCaps( $s->defaultRole ) ) ); if ( $caps ) { $out[] = Finding::make( 'settings_open_registration_privileged', 'users_can_register', array( $s->defaultRole, implode( ', ', $caps ) ) ); } else { $out[] = Finding::make( 'settings_open_registration', 'users_can_register', array( $s->defaultRole ) ); } } $installed = array(); foreach ( $ctx->plugins as $p ) { $installed[ $p['file'] ] = true; } foreach ( $s->activePlugins as $a ) { if ( isset( $installed[ $a['entry'] ] ) ) { continue; } $code = $a['exists'] ? 'settings_active_plugin_hidden' : 'settings_active_plugin_missing'; $out[] = Finding::make( $code, $a['entry'], array( $a['entry'], $a['option'] ) ); } return $out; } /** @return Finding[] */ public static function inspectOption( OptionEntry $o, Context $ctx ): array { // JSON-escaped