  Experimental violations of Bell inequalities are in general vulnerable to
so-called "loopholes." In this work, we analyse the characteristics of a
loophole-free Bell test with photons, closing simultaneously the locality,
freedom-of-choice, fair-sampling (i.e. detection), coincidence-time, and memory
loopholes. We pay special attention to the effect of excess predictability in
the setting choices due to non-ideal random number generators. We discuss
necessary adaptations of the CH/Eberhard inequality when using such imperfect
devices and -- using Hoeffding's inequality and Doob's optional stopping
theorem -- the statistical analysis in such Bell tests.
