Phi Shampoo Analyzer Diagnostic Tool

Plugin Information

Plugin Version:

Text Model:

Vision Model:

Text API URL:

Vision API URL:

API Token: Not configured'; ?>

WordPress Environment

WordPress Version:

PHP Version:

Analyzer Page: View Page'; } else { echo 'Not created'; } ?>

API Connection Test

Text Model Test

API functions not defined.

'; } else { $api_url = PHI_SHAMPOO_HF_TEXT_API_URL; $api_token = phi_shampoo_get_api_token(); if (empty($api_token)) { echo '

API token not configured. Please go to the Settings Page to configure your token.

'; } else { $response = wp_remote_post($api_url, array( 'headers' => array( 'Authorization' => 'Bearer ' . $api_token, 'Content-Type' => 'application/json' ), 'body' => json_encode(array( 'inputs' => 'Test prompt: Analyze these ingredients: Water, Glycerin', 'parameters' => array( 'max_new_tokens' => 50, 'temperature' => 0.7 ) )), 'timeout' => 30 )); if (is_wp_error($response)) { echo '

Error: ' . $response->get_error_message() . '

'; } else { $status = wp_remote_retrieve_response_code($response); $body = wp_remote_retrieve_body($response); echo '

Status Code: ' . $status . '

'; if ($status === 200) { echo '

Text API connection successful!

'; echo '

Response Preview:

'; echo '
' . htmlspecialchars(substr($body, 0, 300)) . '...
'; } else { echo '

API returned non-200 status code.

'; echo '

Response:

'; echo '
' . htmlspecialchars($body) . '
'; } } } } ?>

Vision Model Test

Note: Vision model test requires an image upload. To test, please use the main plugin interface.

File Structure Check

'Main plugin file', 'assets/css/style.css' => 'CSS styles', 'assets/js/phi-shampoo.js' => 'JavaScript functionality' ); $all_files_exist = true; foreach ($required_files as $file => $description) { $file_path = dirname(__FILE__) . '/' . $file; $exists = file_exists($file_path); echo '

'; echo '' . $file . ': '; if ($exists) { echo 'Found'; } else { echo 'Missing'; $all_files_exist = false; } echo ' - ' . $description; echo '

'; } if ($all_files_exist) { echo '

All required files are present.

'; } else { echo '

Some required files are missing.

'; } ?>