Preheat the oven to 425°.
In a large bowl, whisk together the flour, sugar, baking powder, and salt.
Add the bacon, cheese, and onions (if using) and mix again.
Make a well in the center of the flour mixture.
In a small bowl, mix together the milk, egg, and melted butter.
Pour this mixture all at once into the well and stir just until moistened.
Do not overmix.
Fill greased muffin cups ⅔ full and bake for 20 to 25 minutes or until done.
Immediately remove the muffins from the pan and place on a wire rack to cool.