Overall, Ralph is a very good person and a natural leader. However, he is not flawless. Although he generally stands up for Piggy, he does laugh at him. Ralph chants the name "Piggy" at the very beginning of the novel, showing his childishness and thoughtlessness early on. As the novel goes on, Ralph tries to be more mature, more of a responsible leader. But initially, he mocks Piggy. When Jack calls him Fatty, Ralph corrects him, saying his name is Piggy. He apologizes and rationalizes "Better Piggy than Fatty."
Ralph is not really a bad leader. In fact, he's a natural. But he is inexperienced and has the disadvantage of being a child trying to lead other children. One could argue that since he loses most of the boys to Jack's camp, he is the inferior leader. However, this has more to do with the boys' regression from civilized people to a savage mob. Following this regression, they are more interested in playing, hunting, and eating meat than they are with being rescued.
Ralph and Piggy are the most logical, most responsible (Simon, the most innocent). However, Ralph does have the animal instinct in him as well. He and Piggy, perhaps out of fear and conformity, take part in the mob that kills Simon on the beach at the end of Chapter 9.