Really, there's no perfect formula for making challange appropriate monsters. Playtesting certainly helps, but not every group is the same, or uses the same tactics, so you can get wildly different outcomes with different groups of similar characters.
Like Jengenritx does, when I create a new monster, I compare my finished product to a couple of similar monsters from the MM. For example, if I make a CR 3 corporeal undead, then I'll compare it to a wight (also CR 3) to see if I'm in the ballpark, From that point I'll add or subtract special abilities, hit points, AC, etc., until I feel I have the right mix.
In the end, it comes down to a gut feeling, which is usually right, but then again, I've slaughtered whole parties with a new monster I thought was a "cake-walk".
Fell free to post one of your creations. I'd be happy to help you get it as close as possible to the desired CR.
BD