My Mesh is broke after automatic weight, how to fix it?

Hi i’m try to learn blender so i just try rigging and this is what happend

My model shoulder and wrist are broken like this and i don’t know how to fix it

this is my blend.file if you want to see

Hi, The problem is not with the automatic weighting its your ik’s you didn’t bend the knees and elbows when applied the ik, and i also suggest you to check the naming of your bones.
You can fix it by changing the pole angle to -90 degree.

Oh okay Thank you