I agree that the yellow card could have been given earlier, in theory, but I do think that the unusually long time that the Sharks spent defending their tryline complicated matters for the ref: Yes the Sharks did concede several penalties in the 'red-zone' but it was not as if they were all in rapid succession. There was quite a gap in time between successive penalties. I'm not saying this is a knock-down argument in favour of withholding the yellow card, but I can see how it could impinge on the ref's thinking.
Furthermore, he may have made some mistakes, but I don't think the ref was biased. There were several calls that could have gone against the Reds and didn't....
...Alas! no ref is perfect, and if they were, what would we all talk about afterthe game!!!