sfProjectAnalyserPlugin: is your code beautiful?

2 gravatar By Grégoire Marchal - 09/16/2010

If you believe you are a Symfony boss, if you think that your code respects the strictest standards, if you're sure that all your methods are documented, if you never calls sfContext::getInstance(), then you can face the terrific sfProjectAnalyserPlugin!

This plugin allows to measure the quality and the volumetry of a project. It counts the applications, modules and actions, checks the size of the functions and templates, alerts when it finds out abnormal stuff, and many other things.

It's not only a toy to generate some statistics about your work. It becomes definitely useful when it is used as a continuous integration tool. Imagine that you start a brand new Symfony project: if every morning, after your fried bacon, you launch the analysis and you follow the precious advices of the result page, you'll have in the end a beautiful, clean and easy to debug code. Then you'll become the king of oil and you could make a huge donation to the kind developers of this plugin!

And if you think it isn't strict enough (or too strict, shame on you :)), it's OK! It's completely configurable through a YAML file.

The analyse can be launched using a Symfony command :

symfony project:analyse --application="frontend" --env="dev" > analysis.html

It generates a HTML report that you can see using your favourite browser:

sfProjectAnalyserPlugin on sf sandbox

You can find more informations on the sfProjectAnalyserPlugin plugin page.

PS: you might have guessed that I'm one of the developers of this wonderful plugin! Even if my contribution has been modest for now... (I'll catch up, Loïc!)

Back home

Comments (2)

gravatar By devFactor, the 09/17/2010 at 11:34 AM
Cool thing. Will definately check it out with my current project :)
gravatar By Grégoire Marchal, the 09/17/2010 at 11:30 PM
Cool! Don’t forget the “I use it” button on the plugin page ;)