Yup. Wesley Crusher, in some cases Picard, Dr Crusher. Data is always the Deus Ex Machina.
Mary Sue or Marty Stu or Scooby Doo aside, what bothered me more was writing up the Mary Marty bunch by writing down everyone else as if they're all a bunch of nitwits. "The Naked Now" almost gets away with it thanks to the virus, but "Datalore" (amongst others) quickly fail when making Riker and Picard act so numb just for the sake of Wesley Wonderbread. As a result, everyone ends up looking bad, and even the target audience isn't going to buy into it either. Just just the concept of Lore helps save the day, kudos go to Spiner and his acting as Lore to save the day as well, as did Dorn's in their scenes together, and that incidental music - which was cinematic. Everyone played it straight, but a big positive accolade for Wheaton should be mentioned: A bad actor couldn't begin to do the "tantrum" scenes with any gusto, flair or air of authenticity. despite the plot's foibles, Wheaton played it all absolutely straight, nailed the key scenes, and kept me focused on the character, not the actor trying to play a character - on top of a script that was given better treatment than it deserved; a script that needed more refining to let Wesley show the genius without said script turning the adults into a bunch of dingalings to hollowly and artificially boost the genius. (Season 2 onward did Wesley (along with everyone else) a lot more justice and Wheaton continued to excel.) Wheaton unfairly gets graft by people who conflate actor as being the role, which isn't right.
Sorry to get off topic but it's a great example of where elevating one character at the expense of others serves none of them any good in the end. As well as the Mary Marty Scooby doobie aspect.