WooNooW Installation Checker
1. File Structure
'Main plugin file',
'includes/Admin/Assets.php' => 'Assets handler',
'includes/Api/Routes.php' => 'API routes',
'admin-spa/dist/app.js' => 'SPA JavaScript',
'admin-spa/dist/app.css' => 'SPA Stylesheet',
];
foreach ($required_files as $file => $desc) {
$path = $plugin_dir . '/' . $file;
$exists = file_exists($path);
$size = $exists ? filesize($path) : 0;
$status = $exists ? '✓ PASS' : '✗ FAIL';
echo "$status - $desc
";
echo " Path: $file\n";
if ($exists) {
echo " Size: " . number_format($size) . " bytes\n";
echo " Modified: " . date('Y-m-d H:i:s', filemtime($path)) . "";
} else {
echo " FILE NOT FOUND!";
}
}
?>
2. PHP Configuration
phpversion(),
'OPcache Enabled' => function_exists('opcache_get_status') && opcache_get_status() ? 'Yes' : 'No',
'Memory Limit' => ini_get('memory_limit'),
'Max Execution Time' => ini_get('max_execution_time') . 's',
'Upload Max Filesize' => ini_get('upload_max_filesize'),
];
foreach ($php_checks as $check => $value) {
echo "INFO $check: $value
";
}
?>
3. WordPress Detection
✓ PASS WordPress loaded";
echo " WP Version: " . get_bloginfo('version') . "\n";
echo " Site URL: " . home_url() . "\n";
echo " Admin URL: " . admin_url() . "";
// Check if plugin is active
if (function_exists('is_plugin_active')) {
$is_active = is_plugin_active('woonoow/woonoow.php');
$status = $is_active ? '✓ ACTIVE' : '⚠ INACTIVE';
echo "$status - Plugin Status
";
}
} else {
echo "✗ FAIL WordPress not found
";
}
?>
4. Constants Check
⚠ WARN' : '✓ PASS';
echo "$status - WOONOOW_ADMIN_DEV = " . ($dev_mode ? 'true (DEV MODE!)' : 'false') . "
";
} else {
echo "✓ PASS - WOONOOW_ADMIN_DEV not defined (production mode)
";
}
if (defined('WP_DEBUG')) {
$debug = WP_DEBUG;
$status = $debug ? '⚠ WARN' : '✓ PASS';
echo "$status - WP_DEBUG = " . ($debug ? 'true' : 'false') . "
";
}
?>
5. Namespace Check (Routes.php)
✓ PASS - Correct namespace (WooNooW\\Api\\)";
} elseif ($has_wrong_namespace) {
echo "✗ FAIL - Wrong namespace (WooNooW\\API\\) - needs update!
";
} else {
echo "⚠ WARN - Could not detect namespace
";
}
}
?>
5b. Dev Mode Filter Check (woonoow.php)
✗ FAIL - Hardcoded dev mode filter found in woonoow.php!";
echo " This forces dev mode ON for everyone.\n";
echo " Remove this line from woonoow.php:\n";
echo " add_filter('woonoow/admin_is_dev', '__return_true');";
} else {
echo "✓ PASS - No hardcoded dev mode filters
";
}
}
?>
6. Asset URLs
CSS URL: $css_url\n";
echo "JS URL: $js_url";
// Test if URLs are accessible
echo "Testing URL accessibility...
";
$ch = curl_init($css_url);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
$css_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$status = ($css_code == 200) ? '✓ PASS' : '✗ FAIL';
echo "$status - app.css (HTTP $css_code)
";
$ch = curl_init($js_url);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
$js_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$status = ($js_code == 200) ? '✓ PASS' : '✗ FAIL';
echo "$status - app.js (HTTP $js_code)
";
}
?>
7. Recommendations
✓ All checks passed!";
echo "If SPA still not loading, try:
";
echo "1. Clear browser cache (Ctrl+Shift+R)\n";
echo "2. Clear OPcache: php -r \"opcache_reset();\"\n";
echo "3. Clear WordPress cache: wp cache flush";
} else {
echo "Issues found:
";
echo "";
foreach ($issues as $issue) {
echo "- $issue
";
}
echo "
";
}
?>
8. Quick Actions
✓ OPcache cleared!";
} elseif ($_GET['action'] == 'phpinfo') {
echo "";
phpinfo();
echo "
";
}
}
?>
Generated: |
Server: