DEV Community

Top 6 PHP code quality tools 2023

Bentil Shadrack on May 30, 2023

PHP is a popular programming language for web development that powers a large number of websites and internet-based applications. Code quality is e...
Collapse
 
joebordes profile image
Joe Bordes •

I agree with this list, essential tools to work with PHP, but I have to recommend sonarqube. Combined with these it is a another level of programming experience.
Note; no affiliation with them.
HTH

Collapse
 
qbentil profile image
Bentil Shadrack Documatic •

Thank you very much Joe🙌
I will try that

Collapse
 
mjtheone profile image
Marius Posthumus •

I would like to add Infection to the list to fully test if your tests are ACTUALLY testing the correct things.
It's a very interesting tool that changes your code and reruns the tests to see if you missed certain branches / situations.

Collapse
 
qbentil profile image
Bentil Shadrack Documatic •

Awesome 👏
Thank you Marius

Collapse
 
pronskiy profile image
Roman Pronskiy •

Would you be interested to try Qodana? It's a static code analysis tool by JetBrains with support for PHP. jetbrains.com/qodana/

Collapse
 
qbentil profile image
Bentil Shadrack Documatic •

Great
Thank you Pronskiy. I will check it out

Collapse
 
cavo789 profile image
Christophe Avonture • • Edited

There is also a.o.t phpcpd (php copy paste detector) and, for Laravel, larastan. And, on top of phpunit, Pest, so much better.

Collapse
 
qbentil profile image
Bentil Shadrack Documatic •

Oh greatt🙌

Thank you Chris

Collapse
 
akuoko_konadu profile image
Konadu Akwasi Akuoko •

Awesome read Bentil, unfortunately I've not used PHP before, maybe I'll try in the future

Collapse
 
qbentil profile image
Bentil Shadrack Documatic •

Thank you Akwasi

Collapse
 
halleck45 profile image
Jean-François •

Thanks for this article. I don't know if you are aware of this list, it's quite handy.

I am the creator of PhpMetrics. For a few weeks now, I have been working on an analyzer written in Go, which is very efficient and provides a lot of useful metrics. It is still experimental, but very promising, I hope. If you want to test it, I am open to feedback and suggestions: github.com/Halleck45/ast-metrics