The purpose of the media code of practice is to filter out unnecessary, speculative, and subjective details from the information that is to be delivered as news to the community.
The code of practice is effective as a philosophy because the job of the media is to report, entertain, persuade, and inform, not to become entangled in dramatic details: That is what theatrics and drama are for.
As for its actual effectiveness, the fact is that as of today England's yellow press continues to squeeze celebrities who love the excessive detail and attention paid to their daily lives just for the sake of exposure. There are still publications who "leak" information and publish it, not worrying about the potential repercussions that could occur.
As of recently, I can think of one effective thing the code of practice did and it was when 14 years ago the code basically begged papparazzis that the pictures of Princess Diana's dead body in a crash were not published in any magazine. And people know that they WERE taking pictures of her and her crash, who knows if while she was still battling for her life.
Autopsy pictures, suicide pictures, pictures of dead children, rape victims, dismembered victims, etc are the primary target to be avoided for publication.