http://blogs.msdn.com/b/torstenmandelkow/archive/2013/10/08/free-sharepoint-code-analysis-tool-available.aspx has a post regarding SPCop, a Visual Studio Extension to analyze SharePoint code.
Analyzes the following objects from SharePoint solutions (.wsp) for SharePoint 2007 / 2010 / 2013 and SharePoint 2013 apps directly in Visual Studio 2010/2012/2013
- Memory disposal rules previously checked by SPDisposeCheck
- XML code in SharePoint packages
- Content Types
- List Templates
- Pages (.aspx) and Master Pages
http://www.spcaf.com/ for additional information on this and additional items.
NOTE : I am not endorsing any products or tools, only sharing some TLC of tools that may help address some common pain points around development, deployment and my beloved and often abused SharePoint.