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?
A simple way of quantifying complexity on a structural basis would be to count the number of components and/or interactions within a system.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With