Available Processors

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

Summary

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

Dependency Injection (DI) Analysis

AroundPlugins

Classifies around plugins and detects deep plugin stacks.

SameModulePlugins

Detects plugins targeting classes in the same module.

MagentoFrameworkPlugin

Detects plugins on Magento Framework classes.

NoProxyInCommands

Detects console commands without proxy usage for heavy dependencies.

Preferences

Detects multiple preferences for the same interface/class across modules.

ProxyForHeavyClasses

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

DiAreaScope

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

SpecificClassInjection

Detects concrete class injection where interfaces or factories should be used.


Code Quality

HardWrittenSQL

Detects raw SQL queries in PHP code.

UseOfObjectManager

Detects direct ObjectManager usage.

UseOfRegistry

Detects deprecated Registry usage.

PaymentInterfaceUseAudit

Detects deprecated payment method implementations.


Template/View Layer

Cacheable

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

AdvancedBlockVsViewModel

Detects $this usage and excessive data processing in phtml templates.

Helpers

Detects deprecated Helper patterns.

InlineStyles

Detects inline style="" attributes and <style> blocks in phtml templates.

DeprecatedEscaperUsage

Detects deprecated escape method calls on $block or $this instead of $escaper in phtml templates.


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 Block classes vs total PHP classes 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