I'm using PHPStorm as my main IDE to development in PHP.

I was looking for any plugin to count lines of code (LOC) but I didn't find any. Someone knows a good option?


  • Count all lines of code;
  • Count lines ignoring comments and PHPDoc blocks;
  • Count lines of a specific file;

Plugins for other JetBrain products which can be adapted to PHPstorm are also welcome.

2 Answers 2


I just found a plugin in the jet brains repo. Its called PHPStats - SLOC Counter. It does the SLOC analyses but in my option could have some better features, for example selecting files and via eg rightclick -> count SLOC get shown the SLOC for that selection.

  • Indeed, it could be better, but looks like the only option. Thx.
    – James
    Commented Aug 12, 2015 at 17:07

There's another plugin named "Statistic", but it seems to be intended for Java:

Shows project statistic. This plugin shows files sorted by their extension along with size, line count LOC etc. User can select (Project/Module/Package/File) scope using the 'Refresh on selection' button. (This plugin requires Java 1.7)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.