{"id":169,"date":"2025-12-22T05:40:00","date_gmt":"2025-12-22T10:40:00","guid":{"rendered":"https:\/\/kimsal.com\/blog\/?p=169"},"modified":"2025-12-15T18:21:25","modified_gmt":"2025-12-15T23:21:25","slug":"php-quality-tools-phpinsights","status":"publish","type":"post","link":"https:\/\/kimsal.com\/blog\/2025\/12\/22\/php-quality-tools-phpinsights\/","title":{"rendered":"PHP Quality Tools &#8211; phpinsights"},"content":{"rendered":"\n<p><a href=\"https:\/\/github.com\/nunomaduro\/phpinsights\">phpinsights<\/a> is a tool you can use to get a nice overview of the quality state of a PHP project. The tool will analyze the code, complexity, architecture and some code style rules, then present four corresponding scores.<\/p>\n\n\n\n<p>Measuring over time will give you a sense of which areas of your code are improving, and which areas might need some more attention.<\/p>\n\n\n\n<p>As with many quality tools, the measurements and grading are opinions, but those opinions are generally based on industry-accepted views.  <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Following a single standard coding styles is preferable to each file being formatted differently.  <\/li>\n\n\n\n<li>Smaller code blocks are preferable to larger code blocks<\/li>\n\n\n\n<li>and so on&#8230;<\/li>\n<\/ul>\n\n\n\n<p>phpinsights uses php_codesniffer under the hood, and provides its own out of the box default set of configurations (in other words, its own opinions).<\/p>\n\n\n\n<p>It&#8217;s a nice and easy package to get a quick overview of the state of things.  Folks with more time on their hands can dig in to its configuration and set things up the way they&#8217;d like, or may wish to dig in to <a href=\"https:\/\/github.com\/PHPCSStandards\/PHP_CodeSniffer\/\">php_codesniffer<\/a> directly.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"441\" src=\"https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/preview-1024x441.png\" alt=\"\" class=\"wp-image-171\" srcset=\"https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/preview-1024x441.png 1024w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/preview-300x129.png 300w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/preview-768x331.png 768w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/preview-1536x662.png 1536w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/preview.png 1764w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"893\" src=\"https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/phpqa-phpinsights-summary-1024x893.png\" alt=\"\" class=\"wp-image-170\" srcset=\"https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/phpqa-phpinsights-summary-1024x893.png 1024w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/phpqa-phpinsights-summary-300x261.png 300w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/phpqa-phpinsights-summary-768x669.png 768w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/phpqa-phpinsights-summary-1536x1339.png 1536w, https:\/\/kimsal.com\/blog\/wp-content\/uploads\/2025\/12\/phpqa-phpinsights-summary.png 1838w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>phpinsights is a tool you can use to get a nice overview of the quality state of a PHP project. The tool will analyze the code, complexity, architecture and some code style rules, then present four corresponding scores. Measuring over time will give you a sense of which areas of your code are improving, and&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":2,"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":173,"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/posts\/169\/revisions\/173"}],"wp:attachment":[{"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kimsal.com\/blog\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}