xfive | 20 Years of Trust

Can Front-End Code Quality Be Measured?

August 9, 2013
in

In this article, I'll show you how you can design your own Quality Assurance Scoring System based on the criteria from my previous article, Code Quality Assurance Checklist: 8/20 Rule.

For each criterion on our list, we set the maximum number of points a developer can get. This maximum represents the criterion's weight and is based on:

  • How important the criterion is for the project's success: Very important – 3 points, Important – 2 points, Less important – 1 point
  • How difficult it is to fulfill: Challenging – 3 points, Intermediate – 2 points, Easy – 1 point
  • How often it causes problems in your projects: Frequently – 3 points, Occasionally – 2 points, Rarely – 1 point. 

Maximum points represent the criterion's weight.

For example, it's very important for any design to website project that the pages work without JavaScript errors (3 points). On the other hand, it's easy to fulfill (1 point), and let's assume it rarely causes problems in your projects (1 point). In that case, a developer can get a maximum of 5 points for meeting this criterion. 

If JavaScript errors are found during QA, the developer gets fewer points, e.g., 3 points, depending on the number of errors.

The maximum points we use at xfive for each criterion are listed below:

  1. Are all required pages / states developed? – 5 points
  2. Are all requirements met? – 7 points
  3. Do pages work without JavaScript errors? – 5 points
  4. Is reasonable pixel precision achieved? – 8 points
  5. Do pages display and work correctly in supported browsers? – 9 points
  6. Are all pages valid? – 5 points
  7. Are the correct tags being used? – 6 points
  8. Are the pages using microformats where appropriate? – 4 points
  9. Do pages follow agreed HTML coding standards? – 4 points
  10. Do pages follow agreed CSS coding standards? – 4 points
  11. Do pages follow agreed JavaScript coding standards? – 4 points
  12. Are stylesheets merged? – 3 points
  13. Are image files sufficiently compressed? – 3 points
  14. Are CSS sprites being used for images? – 4 points
  15. Is usage of excessively specific CSS selectors and improper use of the !important rule avoided? – 4 points
  16. Can page content be understood and easily navigated with images turned off? – 5 points
  17. Do pages degrade gracefully with JavaScript turned off? – 4 points
  18. Are correct ALT attributes for images provided? – 4 points
  19. Is the proper heading structure in place? – 3 points
  20. Are labels associated with FORM elements? – 3 points

The QA Score is then calculated as a percentage:

QA Score = Acquired points / Total max points × 100

In our case, the total maximum a developer can get is 94 points. If a developer gets 89 points, their score is 95% (89 / 94 × 100).

If a criterion is not applicable, for example when a site has no use for microformats, its points are subtracted from the total max points, and the score is calculated only from the points a developer can actually get.

The system can be adapted to various needs, and a user-friendly tool can be built for Quality Controllers to rate each criterion. Another advantage is that by changing the criteria weights, you can put more focus on the areas that cause problems most often in your software development life cycle (SDLC).

Series Contents

  1. Code Quality Assurance Checklist: 8/20 Rule
  2. Can Front-End Code Quality Be Measured?
  3. Using QA in Front-End Developer Recruitment‍

Stay Ahead with Expert Insights

Subscribe for the latest market insights, professional advice, and practical strategies delivered directly to your email.

Thanks! You’re now subscribed.
Oops! Something went wrong while submitting the form.

About the author

Lubos Kmetko
Hi, I'm
Lubos Kmetko
,
a Webflow Developer and QA
at xfive.

Lubos is responsible for Webflow development and QA at xfive, drawing on 20+ years of web development, including four years leading its QA department.

Connect on LinkedIn