I've never used threaded inserts before, so I thought it would be worthwhile to learn to use them correctly.
For reference, I bought these.
If you're unfamiliar with threaded inserts, they're small pieces of brass with grooves on the outside and threads on the inside. You can secure them into plastic so you have a strong place to screw a bolt into. (Compare this to screwing a bolt directly into plastic - the threads would immediately strip.
The question is, how big do you make the whole in your 3D print to accommodate one of these? Online guidance varies, so I determined some experimentation was necessary. The outer diameter of the threaded inserts per my datasheet was 5.3mm. As a result I decided to test with sizes from 3.5mm up to 5.25mm, almost the size of the outer diameter. Here's the test rig I made to test these sizes. I've made this available for printing here.
The general installation method for these bad boys is to use a soldering iron to heat the threaded insert up, then push it down into the plastic. This worked admirably. The operation involves pushing them in half way with the soldering iron, and then pushing them the rest of the way with a large flat piece of metal to ensure they're flat.
As you can see, I installed threaded inserts in only the five largest holes. By the time I had reached 4.25mm, there was so much extra plastic melting around the insert that it was pushing up the bottom and out the sides.
I also found that it was challenging to ensure the threaded inserts solidified such that they were vertical. I was using a screwdriver to hold them flat while they cooled. I believe that instead, a large piece of metal would ensure equal pressure was being applied to all sides of the insert, thereby ensuring they cooled perfectly flat. Here you can see that the second-from-left insert in particular cooled off-kilter.
Overall, I found that the experiment was a good success. I felt that 5.00 mm is an optimal size for the threaded inserts. Enough plastic must melt to ensure a good grip is formed on the insert when the plastic cools, but not so much plastic melts that it risks intrusion through the bottom or out the sides.
I'll be using 5.00mm holes for all my M4 threaded insert holes for the project.