Available Processors

EasyAudit includes 19 static analysis processors for Magento 2 codebases. Each processor outputs findings with appropriate severity levels (error, warning, or note) and provides actionable recommendations.

Summary

Processor Category Severity Description
SameModulePlugins DI Warning Plugins targeting classes in the same module
MagentoFrameworkPlugin DI Warning Plugins on Magento Framework classes
AroundPlugins DI Note Around plugins replaceable with before/after
NoProxyInCommands DI Warning Console commands without proxy for heavy deps
Preferences DI Error Multiple preferences for the same interface
ProxyForHeavyClasses DI Warning Heavy classes injected without proxies
DiAreaScope DI Note Plugins/preferences in global di.xml for area-specific classes
HardWrittenSQL Code Quality Error Raw SQL queries in PHP code
UseOfRegistry Code Quality Warning Deprecated Registry usage
UseOfObjectManager Code Quality Error Direct ObjectManager usage
SpecificClassInjection Code Quality Warning Concrete class injection instead of interfaces
PaymentInterfaceUseAudit Code Quality Error Deprecated payment method implementations
Cacheable Templates Warning Blocks with cacheable="false" in layout XML
AdvancedBlockVsViewModel Templates Note $this usage and data processing in phtml
Helpers Templates Warning Deprecated Helper patterns
CollectionInLoop Performance Warning N+1 queries: model/repository loading inside loops
CountOnCollection Performance Warning count() on collections instead of getSize()
BlockViewModelRatio Architecture Note High block-to-viewmodel ratio per module
UnusedModules Architecture Note Modules present but disabled in config.php

Dependency Injection (DI) Analysis

SameModulePlugins

Detects plugins targeting classes in the same module.

MagentoFrameworkPlugin

Detects plugins on Magento Framework classes.

AroundPlugins

Classifies around plugins as before/after replaceable or true overrides.

NoProxyInCommands

Detects console commands without proxy usage for heavy dependencies.

Preferences

Detects multiple preferences for the same interface/class.

ProxyForHeavyClasses

Detects heavy classes (Session, Collection, ResourceModel) injected without proxies.

DiAreaScope

Detects plugins and preferences in global di.xml that target area-specific classes.


Code Quality

HardWrittenSQL

Detects raw SQL queries in PHP code.

UseOfRegistry

Detects deprecated Registry usage.

UseOfObjectManager

Detects direct ObjectManager usage.

SpecificClassInjection

Detects injection of specific classes instead of interfaces.

PaymentInterfaceUseAudit

Detects deprecated payment method implementations.


Template/View Layer

Cacheable

Detects blocks with cacheable="false" in layout XML.

AdvancedBlockVsViewModel

Detects $this usage and data processing in phtml templates.

Helpers

Detects deprecated Helper patterns.


Performance

CollectionInLoop

Detects N+1 query patterns: model or repository loading inside loops.

CountOnCollection

Detects count() usage on Magento collections instead of getSize().


Architecture & Best Practices

BlockViewModelRatio

Analyzes ratio of Blocks vs ViewModels per module.

UnusedModules

Detects modules present in codebase but disabled in config.php.


Severity Levels

Level Meaning CI Behavior
error Critical violation Should block merges
warning Important issue Non-blocking
note Informational Non-blocking

Back to README