Measure PHP project complexity and maintainability

I’m optimizing my Meta Box plugin and I need a way to measure the project’s statistics such as complexity and maintainability. After searching on Google, I found PHPMetrics, a wonderful project that can help me understand lots of key metrics for a PHP project. The result is displayed in a HTML report with some graphs and table of metrics which are very easy to understand. I tried using it with the Meta Box plugin and here is the result:

Continue reading → Measure PHP project complexity and maintainability

PHP Quick Tip: Comment Block

PHP Quick Tip: Comment Block

PHP has 2 types of comments: comment block (for long comments in many continuous lines) and short comment (for one line). When test code, if we don’t want to a block of code execute, we can disable it by turning them into comment blocks using /* ... */, and when we want to execute it, just remove /* and */ characters at the beginning and the end of code. This action is often repeated, and in this article, I want to share a small tip to make this process faster and easier.

Continue reading → PHP Quick Tip: Comment Block