M
M
Mick Coder2015-06-28 13:17:54
PHP
Mick Coder, 2015-06-28 13:17:54

How to analyze PHP code, by what criteria?

Hello!
I need to somehow compare both architectures for building Magento and Prestashop modules. It is necessary to highlight the criteria by which this can be done.
For example, I wrote two modules of the same functionality for these systems, according to what criteria I can analyze and build graphs. (Amount of code, time of writing, availability of design patterns, what else). Are there any software tools for code analysis, plotting?
Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2015-06-28
@lbondodesc

What is the point of such a comparison? And yes, the parameters you have chosen are very conditional. Throw out the writing time, this is only your speed and it does not give an objective assessment. The amount of code is also a very conditional thing. the presence of patterns - they will be the same way, just implemented a little differently. It's also not an indicator.
Indicators can be whether the principle of substitution by Barbara Liskow is observed when writing modules. single responsibility principle, dependency inversion principle, etc. In short, walk through SOLID. And it is worth thinking in that context whether the chosen tools allow you to write code in a way that respects these principles.
There are quite common practices for collecting code metrics that evaluate the complexity and quality of the architecture, but they evaluate your code and will show how bad everything is. Of the tools for collecting these metrics, I can only single out scrutinizer-ci .

A
Alexey Yakhnenko, 2015-06-28
@ayahnenko

If you really wrote both modules, why can't you compare them? Yes, you can’t even compare, you can’t find comparison criteria. What charts do you imagine, what is it all about?

A
Andrew, 2015-06-28
@Ashlst

The main thing that worked, it was easy to expand / maintain and that the code was simple and understandable))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question