Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we measure complexity of web site?

I am familiar with using cyclomatic complexity to measure software. However, in terms of web site, do we have a kind of metrics to measure complexity of website?

like image 550
Boong Avatar asked Mar 07 '11 07:03

Boong


People also ask

How do you measure complexity?

A simple way of quantifying complexity on a structural basis would be to count the number of components and/or interactions within a system.

What is complexity of a website?

Defining Complexity in Web Development For a web developer, “complexity” can be defined as: Everything that is impossible or very difficult to know at the beginning of a project, and which only becomes clear during the project itself. With complex web projects, almost the whole job is learning how to do the job itself.


1 Answers

If you count HTML tags in the displayed HTML pages, as "Operators", you can compute a Halstead number for each web page.

If you inspect the source code that produces the web pages, you can compute complexity measures (Halstead, McCabe, SLOC, ...) of those. To do that, you need tools that can compute such metrics from the web page sources.

Our SD Source Code Search Engine (SCSE) is normally used to search across large code bases (e.g., the web site code) even if the code base is set of mixed languages (HTML, PHP, ASP.net, ...). As a side effect, the SCSE just so happens to compute Halstead, McCabe, SLOC, comment counts, and a variety of other basic measurements, for each file it can search (has indexed).
Those metrics are exported as an XML file; see the web link above for an example. This would give you a rough but immediate ability to compute web site complexity metrics.

like image 195
Ira Baxter Avatar answered Oct 20 '22 23:10

Ira Baxter