['/', I18n::tr('Homepage (speed, cache and compression checks)', 'الصفحة الرئيسية (فحوص السرعة والتخزين المؤقت والضغط)')], 'robots' => ['/robots.txt', I18n::tr('robots.txt', 'ملف robots.txt')], 'llms' => ['/llms.txt', I18n::tr('llms.txt', 'ملف llms.txt')], 'xmlrpc' => ['/xmlrpc.php', I18n::tr('xmlrpc.php (security check)', 'ملف xmlrpc.php (فحص الأمان)')], 'api_catalog' => ['/.well-known/api-catalog', I18n::tr('API catalog file', 'ملف فهرس الواجهات البرمجية')], 'agent_skills' => ['/.well-known/agent-skills/index.json', I18n::tr('Agent skills file', 'ملف مهارات الوكلاء')], ]; $failed = []; foreach ($probes as $key => [$path, $label]) { $res = $ctx->get($key, null); if (!is_array($res)) { continue; } if ((int) ($res['status_code'] ?? 0) === 0) { $chain = isset($res['redirect_chain']) && is_array($res['redirect_chain']) ? $res['redirect_chain'] : []; $last = end($chain); $failed[] = [ 'url' => home_url($path), 'item' => $label, 'error' => Redactor::redact(is_array($last) ? (string) ($last['error'] ?? '') : '', 200), ]; } } if (empty($failed)) { return []; } return [ $this->finding( 'audit_probe_unavailable', sprintf(I18n::tr('Items that could not be checked in this audit (%d)', 'عناصر تعذر فحصها في هذا الفحص (%d)'), count($failed)), 'Technical SEO', 'info', 0, [ 'source' => 'http', 'details' => I18n::tr('The site did not answer these requests during the audit, so their results are unknown. This is not a finding against the site.', 'لم يرد الموقع على هذه الطلبات أثناء الفحص، لذلك نتيجتها غير معروفة. هذه ليست مشكلة في الموقع.'), 'samples' => $failed, ], I18n::tr('Unchecked items are left out of the score instead of being counted as passed or failed.', 'العناصر التي لم تُفحص مستبعدة من النتيجة، فلا تُحسب ناجحة ولا فاشلة.'), [ I18n::tr('Run the audit again when the site is less busy.', 'شغّل الفحص مرة أخرى في وقت يكون فيه الموقع أقل ضغطًا.'), I18n::tr('If it keeps happening, ask your host whether requests from the site to itself are blocked.', 'إذا تكرر ذلك فاسأل الاستضافة هل الطلبات من الموقع إلى نفسه محظورة.'), ], [ 'how' => I18n::tr('Run a new audit.', 'شغّل فحصًا جديدًا.'), 'pass_condition' => I18n::tr('Every item is checked.', 'تُفحص كل العناصر.'), ], $this->id() ), ]; } }