PHP Classes

Complexity Analyzer: Evaluate the complexity of classes' code

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 350 All time: 6,996 This week: 455Up
Version License PHP version Categories
complexity-analyzer 1.0Freely Distributable5.3PHP 5, Testing


This class can evaluate the complexity of classes' code

It can can analyse a given class and provide a ranking of its methods based on their complexity.

Given existing unit tests, this class provides a to do list, consisting of all methods with incomplete or missing tests, again ordered by complexity.

This class complements PHPUnit's code coverage functionality and can be used for guiding test writing efforts.

It provides command line interface options, so it can be executed as a command from a shell.

Innovation Award
PHP Programming Innovation award nominee
January 2012
Number 3

Prize: One copy of RadPHP XE2
Quality control is vital especially for complex projects.

Automated tests are useful to assure the quality of the projects by evaluating whether the code satisfies the project requirements, even after substantial changes are done.

Developing automated tests takes time and dedication of professionals that reckon the value of testing and know how to do it. However, sometimes it is not possible to implement all the tests that a project needs at once.

This class provides a solution that can aid in this problem. In can figure the complexity of the functions of a class and determine the ones that are missing tests.

It can produce lists of functions sorted by complexity, so a testing professional can start working first on those that are more complex.

This way he may give priority to adding tests for code that eventually is more important to satisfy the project requirements.

Manuel Lemos
Picture of Philipp Strazny
  Performance   Level  
Name: Philipp Strazny is available for providing paid consulting. Contact Philipp Strazny .
Classes: 5 packages by
Country: United States United States
Age: 57
All time rank: 1380201 in United States United States
Week rank: 328 Up38 in United States United States Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

  Files folder image Files  
File Role Description
Plain text file ComplexityAnalyzer.php Class for ranking class methods and generating a todo list for test writing
Accessible without login Plain text file ComplexityAnalyzerTest.php Test tests the methods of ComplexityAnalyzer
Accessible without login Plain text file DummyClass.php Data data for ComplexityAnalyzerTest
Accessible without login Plain text file DummyClassTest.php Data data for ComplexityAnalyzerTest

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,996
This week:455Up