Mine is pretty consistent in going to his litter box except for the fact that sometimes his pee is aimed inaccurately so there is the little bit of pee out of the box that I have to clean. Also if there is already pee in the box, he'd poo right beside the box so I have to make sure the box is clean at all times or provide him with 2 boxes so that he pee in one and poo in the other
I just make sure I have plenty of white vinegar(cheap to buy) and Bissell Pet Stain. I also placed a coke bottle filled with water so that he could aim his pee on it in the litterbox. When he was younger, I always leave just a little piece of newspaper with pee stain so that he can smell it and knows where to go.