That would take a while for all the Oxygen in the world to run out though if all plants magically poofed.
The scenario in question though wouldn't allow for plants to all simultaneously die.
They'd slowly die in a gradual rate, with the Oxygen output slowly decreasing at the same rate.
The planet would slowly be starved of Oxygen, leaving all animals to lose consciousness and die. No time to eat eachother.
Plus, should humanity exist in this situation as it does now, then we'd be constantly pumping CO2 and other pollutants into the air, which wouldn't be used up as much due to the dying of the plants, and whatever cause is removing CO2 anyway.