Pomm 1.1.0-RC2 is out

Posted 6 years ago.

After a one month test period, some bugs have been fixed and the identity mapper has been re factored to a simplest and more maintainable implementation. This version has been rewritten with in mind the fact that the identity mapper is not a cache to prevent some queries to be done. It is instead the only method to ensure the same object fetched twice from the database will be represented as a single instance in PHP.

The PHP Depend code analyzer has been run against Pomm sources. The results are shown hereafter:

Overview pyramid

The overview pyramid shows a number of interesting statistics about how healthy Pomm's code is:

  • The cyclomatic ratio is 0.216 which is average.
  • Code encapsulation is good with an average of a bit more than 11 lines of code per method.
  • Another indicator of encapsulation is the average of 6.3 methods per class, so far so good.
  • The classes per package ratio is a bit low indicating Pomm could grow.... it is not the goal as we want to keep it performance wise.
  • The inheritance indicators still show low complexity in heirs tree.
  • Each method is called by an average of 2.7 times in the code which is good.
  • The low FANOUT/CALLS indicators show each package does not export its complexity outside itself, which is excellent.

The coupling indicators are very important as they show how the KISS principles are respected hence make the application maintainable and stable over time. Of course these numbers are to be balanced with the fact Pomm is a little project (approx 11k lines of code) and the values are average with no indication about the variance.

Another statistic not dumped by PHPDepend is the test coverage. Theoretically, the number of unit tests should equals the total cyclomatic complexity to ensure every path of the running code is tested. This would mean Pomm should have 955 test assertions to pretend a test coverage of 100%, the actual number of tests are 396. Here again, precaution must be observed as we have no information about the repartition of the test coverage. Some parts may be very well tested whereas some other are poorly covered. A closer look would show that CYLO of the converter system is 78 and there are actually 118 test assertions on this part. In the Tools package, the cyclomatic complexity is a mere 104 and there are only 12 unit tests on this part.

Last thing: I had excellent feedbacks about the conferences I gave in Paris and Nantes about Postgresql and Pomm. Many thanks to people who got interested into this project, some of them did even post PRs on github. Thank you !