PHP Code Analyzer

Professional Setup & Installation Guide

Kurulum Kontrol Paneli - Sisteminizdeki tΓΌm gereksinimler kontrol ediliyor.

1. System Requirements

Requirement Required Current Status
PHP Version >= 8.0 8.1.34 Success
Memory Limit >= 256M 12800M Success
Max Execution Time >= 300s or 0 (unlimited) 30s Warning
Extension: tokenizer Enabled Enabled Success
Extension: mbstring Enabled Enabled Success
Extension: json Enabled Enabled Success
File Functions Available Available Success

2. Required Files

analyzer-web.php - Found & Readable Web Interface
analyzer.php - Found & Readable Backend API
AdvancedPHPCodeAnalyzer.php - Found & Readable Main Analyzer Class
analyzer_demo.php - Found & Readable Demo Endpoint
index.php - Found & Readable Project Homepage

3. Permissions & Directories

php-code-analyzer - Writable /home/main/public_html/works.zefre.net/php-code-analyzer
tmp - Temp directory accessible /tmp
php_analyzer_cache - Cache directory exists and writable /tmp/php_analyzer_cache

4. Configuration

Project Structure:

php-code-analyzer/ β”œβ”€β”€ analyzer-web.php # Web Interface β”œβ”€β”€ analyzer.php # Backend API β”œβ”€β”€ AdvancedPHPCodeAnalyzer.php # Main Analyzer Class β”œβ”€β”€ analyzer_demo.php # Demo/Test Endpoint β”œβ”€β”€ setup.php # This setup file β”œβ”€β”€ index.php # Project Homepage β”œβ”€β”€ README.md # Documentation β”œβ”€β”€ README_EN.md # English Documentation β”œβ”€β”€ CHANGELOG.md # Version history └── cache/ # Cache directory (auto-created)

Server Information:

  • PHP Version: 8.1.34
  • Operating System: Linux
  • Server Software: LiteSpeed
  • Document Root: /home/main/public_html/works.zefre.net
  • Current Directory: /home/main/public_html/works.zefre.net/php-code-analyzer

5. Installation Steps

  1. Upload Files: Upload all files to your web directory βœ…
  2. Set Permissions: Ensure PHP can write to cache directory
  3. Test Installation: Click the test button below
  4. Configure Projects: Access the web interface to analyze your projects

Installation Test Results

Analyzer Class File: AdvancedPHPCodeAnalyzer.php found and contains main class
API Endpoint: analyzer.php found and ready
Web Interface: analyzer-web.php found and ready
PHP Tokenizer: PHP tokenizer functions available
Tokenizer Functionality: Tokenizer works correctly
JSON Functions: JSON encoding/decoding working
Excellent! All tests passed. Your installation is ready to use.

6. Usage Instructions

Web Interface:

Access analyzer-web.php to use the graphical interface.

https://works.zefre.net/php-code-analyzer/analyzer-web.php

Command Line:

# Analyze a project php AdvancedPHPCodeAnalyzer.php /path/to/project includes,lib,helpers # Example for WordPress themes php AdvancedPHPCodeAnalyzer.php /var/www/wp-content/themes/mytheme includes # Example for Laravel projects php AdvancedPHPCodeAnalyzer.php /var/www/laravel-project app/Helpers,app/Services

API Usage:

curl -X POST https://works.zefre.net/php-code-analyzer/analyzer.php \ -H "Content-Type: application/json" \ -d '{ "project_root": "/path/to/project", "target_dirs": ["includes", "lib"], "output_format": "json" }'