I know someone that works in McDonalds. They all absolutely hate the online orders - every single delivery driver is rude, they shout at them if the order isnt ready when they arrive, they are verbally aggressive and just all round awful people.
Often the thing causing delays is the ice creams and milkshakes - they take longer to process, the machines often go wrong, they break easily and regularly need to be re-filled (all of which takes a lot of time). This is why on really busy and hot days they are often unavailable (the staff have purposefully turned them off so they can catch up on orders).
Due to the amount of customisation people want in their burgers (extra ketchup, no pickles, no mustard etc), all orders are now made to order which is why they are no longer made in advance and placed on the chute. There is also the issue of food allergies & sensitivities which again is why they are no pre-made. This again all adds to the amount of time it takes to process the orders.
For the quickest turn around time, order on the app, park up and wait for your food, or order on the app, and still go through the drive thru to collect it. Dont order anything with customisation and dont order an ice cream or milkshake.
In regard to your food being cold, refuse to accept it and ask for your order to be re-done and brought to you immediately so its hot.
The staff really want for delivery orders to not come through the normal stores for customers - they want them to have dedicated restaurants just for deliveries (they are normally in industrial units out of the way) but they only usually have these in big cities. Everyone would be much happier if every town had both so that customers could be served quicker face to face and the awful delivery drivers could go to their own store just for them.
In regards to under staffing, there is always issue with people calling in sick last minute etc, but often there isnt more room for more staff to work - they are at capacity in regards to physical bodies in the restaurant so they cant have more people working, but orders keep coming through. New stores have much bigger kitchens than old stores so it isnt always an issue in these ones, but if the store is over 10/15 years old the kitchen will absolutely not be big enough for the capacity of orders they receive.