Php Inspections (EA Extended)
for IntelliJ IDEA

Compatible with:  IntelliJ IDEA PhpStorm
05.01.2017
119 557
For support and donations please visit Github | Issues | PayPal.

Please follow me at twitter for status updates.

This plugin is a Static Code Analysis tool for PHP (aka inspections in JetBrains products).

It covers:
- architecture related issues (e.g. design pattern violations)
- weak types control and possible code construct simplifications
- performance issues
- non-optimal, duplicate and suspicious "if" conditions
- validation of magic methods usage
- regular expressions
- validation of exception handling workflow
- compatibility issues
- variety of time-consuming bugs
- PhpUnit API usage
- security issues

Some of inspections are expecting conditional statements (e.g. "if") to use group statement for wrapping body expressions. If this requirement is met then additional inspections are applied to the source code.

For Mac shortcuts, see this reference card. Windows/Linux ones are:
Alt + Shift + I to inspect current file with current profile
Ctrl + Shift + F4 to close results of inspection.

On some projects CPU and therefore battery usage could be intensive, so it should be taken into account when traveling with a laptop.

Download plugin

Recent change notes

Major English and performance improvements, bug-fixes and new inspections

- English improvements, thank you tomzx
- Performance improvements, thank you YourKit

- Access modifiers shall be defined: QF implemented
- Class overrides a field of a parent class: added an option (report private fields)
- Nested not operators usage: new patterns
- Non-optimal regular expression: new patterns, resolved false-positives (cyrillic characters)
- Security advisories for Composer packages: resolved false-positives (using packages by the same author only)
- Suspicious assignments: new patterns, resolved false-positives (continue, throw)
- 'in_array(...)', 'array_search()' type unsafe usage: QF implemented
- '(mb_)substr(...)' used as index-based access: resolved false-positives (PHP 5.3 compatibility, negative offsets)
- 'unset(...)' calls could be merged: implemented QF

- 'file_put_contents(...)' misused: implemented
- Unknown inspection suppression: implemented
- Cascading dirname() calls: implemented
- Static local variables usage: implemented (needs activation)
- Packed hashtable optimizations: implemented
- Unused goto labels: implemented
- Insecure 'crypt(...)' usage: implemented
- Variable functions usage: re-implemented, added QF

23.12.2016
Great plugin. Very useful inspections.
13.10.2016
Indispensable plugin!
08.04.2016
Perfect Plugin :-) i really love it :)
10.03.2016
Cool plugin, it really shows how to improve your code and makes you think about how you write code.
14.02.2016
It's a must have!
14.02.2016
This plugin is awesome! Thank you!
14.02.2016
Using it every day. Very useful extra checks for daily coding and reviews.
04.01.2016
C помощью плагина пофиксил древнючий баг в своём проекте. :) Описание бага: http://habrahabr.ru/post/136835/
03.01.2016
Good plugin, but i can't install it on PhpStorm 10.0.2. Please make update :)
25.10.2015
Great plugin. Would be perfect if supported more intentions for the inspections it finds
Anonymous
25.10.2015
Great Plugin
07.04.2015
Several simple inspections will be contributed into PHP CS FIxer, but I don't plan to provide any command line version. By that could be an good idea for commercial version of this plugin.
Anonymous
07.04.2015
Is it possible to use this outside of phpstorm? command line tool maybe?
Anonymous
06.04.2015
Amazing plugin!
Anonymous
15.03.2015
Suppression needs to be improved, but it still amazing what you are doing here! Keep going like this. PS: I saw several nice PRs in symfony, good work =)
Please  sign in  to leave a comment.