The Tony Ferguson that showed up vs RDA is a way, way worse matchup than Khabib. Mcgregor heavily depends on being bigger than his opponent and leaning on his reach. You're talking about a guy that is legit 6 foot and isn't some stuck-in-the-mud, weight on the front foot middle of the pack guy like Diaz. Not only that but he's very unorthodox, has a great ground game and very good wrestling.
Mcgregor looked much improved vs Eddie Alvarez and I think he would potentially be a problem matchup for Khabib.
Remember though, Ferguson and Khabib are both BIG lightweights. Khabib has put on a significant amount of size since his first fight in the UFC. Ferguson is tall as hell for that division. Both big problems for McG