This is a very rough guide on what a rollbar needs to be an effective safety device, as opposed to a bit of cosmetic bling (like most "rollover" hoops on the market are)
These things need to be properly engineered.
So what would we be looking for: Well, apart from finding mounting points on the body that are strong enough not to give way from the impact of the rollover and probably reinforcing those mounting points.
The bar will need some triangulation bracing in it's design for strength and be made out of quality tubing with sufficient wall thickness to do the job, so as not to collapse or buckle under load.
It needs to be high enough to prevent you head from hitting the ground, imagine the car upside down with the windscreen removed (crushed in the rollover), the car will be sitting on the rollbar and some point at the front of the car, the rollbar needs to be high enough to keep your head clear of the ground in this position.
When you look at the rollbar in the pic, Old mates head is higher than the bar so this bar is as 'bout as handy as a spare prick at a wedding!
Note the driver isn't wearing a helmet (this would make his head stick out even higher) the event he's driving in won't require rollover protection, a club run, observed section trial, motorkana or some such.
That rollbar would not pass scrutineering for an sanctioned speed event.