Stop drowning in legacy code. Start understanding it
If you've ever inherited a Drupal project with 50+ custom modules, zero documentation, and a deadline breathing down your neck, you know the feeling. That pit in your stomach when someone asks, "How long will this take?" and you genuinely have no idea because you haven't even figured out which modules talk to each other yet.
I've been there. After nearly 9 years of building and maintaining Drupal applications, I've lost count of how many hours I've spent manually tracing function calls, hunting for security vulnerabilities buried in legacy code, and trying to explain architectural complexity to non-technical stakeholders using nothing but hand-waving and whiteboard diagrams that made sense to absolutely no one.
So I built EventHorizon.

The problem nobody talks about
Here's the dirty secret of large-scale projects: understanding code takes longer than writing it.
When you join a new project or pick up a client's existing site, you're not just reading code. You're doing archaeology. You're tracing dependencies across dozens of modules. You're searching for performance bottlenecks that might be lurking in some forgotten hook implementation. You're praying that whoever wrote custom_module_form_alter actually knew what they were doing with user input sanitisation.
The traditional approach looks something like this:
- Open a module file
- Grep for function names
- Open another file
- Lose track of where you started
- Draw something on a whiteboard
- Repeat for 3 days straight
- Still not confident you understand the whole picture
This isn't just inefficient. It's dangerous. When you don't fully understand a codebase, you miss security vulnerabilities. You introduce performance regressions. You break things that seem unrelated. And worst of all, you give inaccurate estimates to clients because you're essentially guessing at complexity.
What EventHorizon actually does
EventHorizon is a comprehensive static analysis and visualisation platform built specifically for Drupal 8, 9, 10, and 11 projects. But calling it a "static analyser" is like calling a smartphone a "calculator that makes calls." It does so much more.
At its core, EventHorizon:
- Visualises your entire module architecture as an interactive, force-directed dependency graph
- Automatically scans for performance anti-patterns and security vulnerabilities
- Analyses Drupal-specific caching implementations with actionable recommendations
- Validates your configuration structure and identifies orphaned entities, broken references, and circular dependencies
- Provides AI-powered insights through a context-aware chatbot that actually understands your specific codebase
- Generates exportable reports in CSV and Excel formats for stakeholder communication
And here's the thing that makes it actually usable: you don't need to configure anything complicated or install dependencies on your Drupal site. Just upload a ZIP file of your codebase and let EventHorizon do its thing.

Getting projects into EventHorizon
One of my biggest frustrations with existing code analysis tools is the setup process. Half the time, you spend more effort configuring the tool than actually using it.EventHorizon takes a different approach. You upload your Drupal project as a ZIP file through a simple web interface. That's it.
The upload process
- On the homepage, click on the upload button
- In the pop-up that follows:
- Fill in the project name (whatever you want to call it),
- Enable/Disable the checkbox that asks if the project is AI-compliant. (Note: even if you choose to keep the AI features disabled, you would be able to do the complete static analysis of the project with all the available tools)
- Browse and select your ZIP file and click Upload

The system automatically extracts your codebase, configures the analysis paths, and makes your project available for analysis immediately. No Docker restarts. No config file editing. No command-line wizardry.
What to include in your ZIP
Required:
- The zip should include the following folder structure:

- Nothing else is required.
The AI compliance checkbox (and why it matters)
Here's something I'm particularly proud of: EventHorizon respects your data privacy requirements.
When you upload a project, you'll see a checkbox labelled "Is this project AI compliant?"

If you check this box, only then EventHorizon will:
- Index your codebase for RAG (Retrieval Augmented Generation)
- Enable the AI chatbot with context-aware responses about your specific code
- Allow AI-powered best practices analysis
If you leave it unchecked, EventHorizon will:
- Run all static analysis features (performance, security, caching, configuration)
- Generate all visualisations and reports
- Never send your code to any AI/LLM service
This matters because not every project allows sending code to third-party AI services. Some clients have strict data handling requirements. Some codebases contain proprietary business logic that shouldn't leave your infrastructure. EventHorizon handles both scenarios without compromising on functionality.
You get the full power of automated static analysis regardless of AI compliance status. The AI features are an enhancement, not a requirement.
The complete feature breakdown
Let me walk you through every tool EventHorizon provides. Each of these would typically require a separate tool or hours of manual work.
1. Project dashboard

The dashboard is your command centre. At a glance, you see:
KPI cards:
- Total Modules: Breakdown by custom, contrib
- Performance Health Score: 0-100, calculated using a penalty-based system (High severity: 10 points, Medium: 3, Low: 1)
- Vulnerability Health Score: Same calculation, focused on security issues
- Complexity Score: Based on connections, services, functions, and hook diversity
Visual analytics:
- Performance Health Treemap (issues visualised by module)
- Vulnerability Posture Treemap
- Module Distribution Chart
The scoring system is designed to be actionable. A score of 85+ means you're in good shape. 70-84 means some attention is needed. Below 70? Time to prioritise cleanup.
2. Interactive dependency mindmap

This is the feature that makes architecture discussions actually productive.
The mindmap is a force-directed graph where:
- Nodes represent modules (sized by complexity)
- Edges represent dependencies (styled by connection type)
- Colours indicate module type: Custom (green), Contrib (blue), Core (gray)
Three visualisation modes:
Module view: See how modules interconnect. Identify those highly-coupled modules that everyone's afraid to touch.

Function view: Drill down to function-level dependencies. See which functions call which across module boundaries.
Service view: Visualise dependency injection patterns. Understand how your services wire together.
Interactive controls:
- Search for specific modules or functions
- Zoom and pan
- Drag nodes to reposition
- Filter by module type
- Click nodes for detailed metadata
I can't tell you how many times this mindmap has saved hours of explanation. Instead of describing architecture in a meeting, I just share my screen and let people explore.
3. Circular dependency function mindmap
Circular dependencies are the silent killers of maintainability. When function A calls B, B calls C, and C calls A, you've created a cycle that makes testing nearly impossible and refactoring terrifying.
EventHorizon automatically detects these cycles and visualises them:

Severity Levels:
- Low: 2-3 functions in cycle (minor concern)
- Medium: 4-6 functions (moderate technical debt)
- High: 7+ functions (critical refactoring target)
The visualisation groups functions by their parent modules, so you can immediately see if the cycle is internal to a module or spans multiple modules (which is worse).

This feature alone has helped me identify refactoring opportunities that would have taken days to find manually.
4. Dependency info page

The Dependency Info page gives you hard numbers on module coupling:
Summary metrics:
- Total circular dependencies
- Severity breakdown
- Function with most dependencies
- Most coupled modules
Per-module metrics:
- Outgoing function calls (cross-module)
- Incoming function calls
- Total dependencies
- Coupling score (0-100)
- Circular dependency count
Coupling score interpretation:
- 0-20: Loosely coupled (excellent)
- 21-50: Moderate coupling (good)
- 51-80: Highly coupled (concerning)
- 81-100: Extremely coupled (needs immediate attention)
When I'm planning a refactoring sprint, this page tells me exactly where to focus and gives me measurable targets.
5. Performance analysis

EventHorizon scans your codebase for performance anti-patterns using pattern-based detection:
What it catches:
- N+1 query patterns
- Uncached database queries
- Missing query tags
- Inefficient entity loading
- Debug code left in production
- Heavy computation in hooks
- Slow file operations
Report structure:
- Issues grouped by severity (High/Medium/Low)
- File paths with exact line numbers
- Issue counts per pattern
- Expandable details for each finding
You can export to CSV or Excel for sprint planning.
6. Vulnerability scan

Security scanning that understands Drupal-specific patterns:
Detection categories:
- Missing XSS protection
- Unescaped Twig output
- SQL injection risks
- Insecure query construction
- Missing permission checks
- Debug mode in production
- Exposed sensitive data
Each finding includes the severity level, file location, line number, and a clear explanation of the risk.
Important caveat: Static analysis doesn't replace security audits. It supplements them. EventHorizon catches pattern-based vulnerabilities, but can't detect all security issues. Use it as part of a broader security strategy.
7. Caching analysis

Drupal's caching system is powerful but notoriously tricky to implement correctly. EventHorizon provides context-aware caching analysis:
What it detects:
- Missing render cache metadata
- Missing cache tags
- Missing cache contexts
- Absent max-age declarations
- User-specific content without user context
- Early rendering problems
- BigPipe opportunities
The best part: Code snippets showing exactly what's wrong and recommended fixes with actual code examples.
This goes beyond "you need caching" to "here's the exact code to add, and here's why it works."
8. Configuration validation

If your project includes a config sync directory, EventHorizon validates your Drupal configuration structure:
What it validates:
- Broken references: Fields pointing to non-existent content types
- Orphaned entities: Paragraphs defined but never used anywhere
- Circular dependencies: Paragraph types referencing each other in loops
- Consolidation opportunities: Duplicate structures that could be simplified
Severity levels:
- Critical: Breaks functionality (paragraph references non-existent field)
- Warning: Causes confusion/inefficiency (orphaned paragraph consuming resources)
- Info: Optimisation opportunity (missing field descriptions)
This is incredibly valuable for sites with complex content models. I've found orphaned paragraph types sitting in configs for years, consuming memory and confusing content editors.
9. Best practices analysis

Evaluation of your codebase against Drupal coding standards:
5 Core categories:
- Code organisation & structure: Namespace usage, service container implementation, plugin architecture
- Security best practices: Input sanitisation, output escaping, and access control
- Performance optimisation: Render caching, query efficiency, static caching
- Code Quality & maintainability: Documentation, complexity, naming conventions
- Drupal API usage: Proper APIs, deprecated functions, and hook standards
Each category gets a 0-100 score with specific recommendations that include:
- Exact file paths and line numbers
- Code examples from your actual codebase (not generic advice)
- Priority and effort estimation


10. AI Chat assistant (RAG-Powered)

This is where EventHorizon goes from useful to indispensable.
The AI chat assistant isn't a generic chatbot. It's a RAG (Retrieval Augmented Generation) system that has indexed your entire codebase. When you ask a question, it:
- Converts your question into a semantic embedding
- Searches the vector database for relevant code chunks
- Retrieves the most relevant functions, services, and configurations
- Generates an answer using that specific context
Example questions you can ask:
- "What functions handle user authentication in this project?"
- "How is field_user_profile used in custom code?"
- "What are the high-severity performance issues?"
- "Explain the dependencies for the checkout module"
- "What hook implementations exist for form alterations?"

The responses include source attribution, so you can verify the information and click through to the actual code.
Multi-LLM support:
- Google Gemini (fast, cost-effective)
- OpenAI GPT-4 (high quality)
- Anthropic Claude (excellent reasoning)
- Ollama (free, local, no API required)
11. Settings & management

The settings page handles:
Project management:
- Add/remove projects
- Clear all data
AI model configuration:
- Configure API keys for different providers
- Select preferred models
- Test different models for quality comparison
Usage logs:
- Track which analysis pages are most used
- View AI query history with response times
- Export logs for analysis
- Monitor team usage patterns
The RAG implementation: why semantic chunking matters
I want to talk about the RAG (Retrieval Augmented Generation) implementation because it's not just a technical detail. It's why the AI chat actually works.
The problem with naive chunking
Most vector databases split text into fixed-size chunks. 512 tokens per chunk, regardless of what's in them. This works fine for prose, but absolutely destroys code.
Imagine splitting a PHP function right in the middle of a conditional block. Now your vector database has two chunks that each contain half a function. When you ask about that function, you might retrieve the first half but miss the second. Or worse, you get partial code that doesn't even parse.
EventHorizon's Semantic entity-based chunking
Instead of arbitrary text splitting, EventHorizon chunks code by semantic entities:
.webp)

