Can a passenger in a car that's legally stopped for a traffic violation be detained by police? Yes. The Courts (both the US Supreme Court and Florida Courts) agree that passengers in a car are not free to leave, and can be lawfully detained for the duration of the stop. The Courts all agree that because traffic stops are brief, "seizing" the passengers in a car is not an unreasonable violation of the Fourth Amendment.
The Court's have also agreed that it's impossible for an officer to watch the driver of the stopped car and all the passengers if some are leaving the scene. Thus the restraint on a passengers liberty is outweighed by officer safety. Remember that there have recently been several officer killed in traffic stops in recent years. BUT - the court weighs the officer safety issue with the rights of the passenger being detained, to be free from unlawful government interference. Florida Courts agree that "(1) the passenger's planned mode of travel has already been lawfully interrupted; (2) the passenger has already been “stopped” due to the driver's lawful detention; and (3) routine traffic stops are brief in duration." Edwin Aguiar v. State, (Fifth DCA, April 2016)
So in the case of Edwin Aguiar v. State,
Mr Aquiar was a passenger in a car stopped for a failing brake light, who walked away from the car. The officer ordered him back into the car, ultimately searched him and Mr. Aquiar was charged and convicted of possession of cocaine and drug paraphernalia. He appealed his conviction and lost because the Fifth DCA said the police did have the right to detain him based upon the above reasons. Just for the reader's knowledge - the cops also have the right to do a pat down search for weapons if you are a passenger in a stopped car. My suggestion to anyone riding in a car that's stopped: Keep Calm, don't talk, and have your lawyer on speed dial.