What the test actually does
It counts pointer presses and divides by the elapsed time. That sounds trivial, and the details are where most click speed tests go wrong: the clock has to start on your first press rather than on page load, or reaction time is charged against your rate; the interval has to be closed by a timer rather than an animation frame, or a backgrounded tab runs long; and elapsed time has to be clamped to the nominal interval, or the projected rate drifts.
All three are handled here, which is why two runs of the same length are comparable. The clock source and its resolution are printed under the instrument so you can see what is being claimed.