Cops must love this one. They can hassle pretty much anyone they want, based on their judgment that the traffic was too close to the suspect. Half a block away, a block away, a mile away, etc.
Based on some of the idjits I've been stuck behind waiting for traffic to clear so they can turn, any visible or imagined traffic would suffice.
School zones are worse for that. In the "opening door into traffic" case, a prudent motorist should wait until there's no vehicle visibly approaching which would arrive before the motorist was out of the traffic lane. If the motorist opens his door, exits the vehicle, closes the door, and walks out of the traffic lane before the other vehicle arrives, there's no basis for a citation.