The first was a joke. A perfectly legal tackle.
The second was fair enough. He raised his elbow. Probably more clumsy than intentional (like JWH), but you can't complain about a card when you raise your elbow going into contact.
The first card made the second card a red, which made the first card worse. But, whether he felt hard done by or not, Du Plessis was a bit of a genius to raise his elbow after having been to the bin.