Skip to content

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

License

Notifications You must be signed in to change notification settings

ovekeryk/magniffer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magniffer

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

List of Detected Issues

  • SQL Queries Within a Loop
  • Not Limiting Collection Load Result
  • Empty Class
  • Empty Method
  • Expression is Always True
  • Empty Password in Configuration File
  • Handling Overly Broad Event
  • Use of Global Event
  • Configuration Not in adminhtml.xml.

Installation

With Composer:

"require": {
  "magento-ecg/magniffer": "dev-master"
}

Basic Usage

mgf /path/to/files

Extending

It's easy to create a custom inspection by declaring a message, xpath and inspector in YAML file. For example:

message   : Empty Class
xpath     : //node:Stmt_Class[count(subNode:stmts/scalar:array/*) = 0]/subNode:name/scalar:string
inspector : php

About

An extendable, XPath driven, static code analysis tool for Magento, built on the top of PHP-Parser library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.8%
  • Batchfile 0.2%