IPhone 3GS 16gb back housing cracked

My iphone has a big crack, like I can fit my finger nail in it. It goes from the dock port past the logo. My phone also decides to shut off randomly and will not turn back on till plugged in. It also won't turn on after I've turned it off until its plugged in. Not sure if that is related to crack or not, but started happening around the same time. I also don't know how it cracked. Should I get a new phone or replace back? Are the two problems related?

The two problems could be related, but that can't be discerned until the back cover is replaced.

I would recommend replacement, due to the age of the phone model.