WASHINGTON — White House counsel Doug McGahn could be among the first to go in a staff shake-up being contemplated by President Trump, sources say.

A source close to Trump said the president has evaluated the performance of his senior staffers on “an ongoing basis since the day he took office” and grew increasingly frustrated with several top aides last week in the midst of the fallout from his abrupt dismissal of FBI Director James Comey.

White House press secretary Sean Spicer struggled to explain to reporters last week why Trump had suddenly fired Comey after repeatedly heaping praise on the top law enforcement official during his campaign.

“Last week was a mess,” a senior White House official told The Post. “No one in the press shop was prepared for the backlash [from Comey’s firing]. And no one in the West Wing warned the president that interviews in the middle of it all might not be in his best interest.”

Michael Dubke, director of White House communications, told the Washington Post that “a great many” West Wing staffers were surprised that “as soon as [Comey’s firing] became a Trump decision, all of the Democrats who had long been calling for Comey’s ouster decided that this was now an awful decision.”

“The Democrats are predictable — they’ve been against us from the start. So it was actually surreal to see colleagues run to reporters and say they were ‘surprised’ by the response to Comey. [That] made us look like amateurs,” said the senior White House official.

Sources close to the president told Axios over the weekend that Trump is watching his top strategist, Steve Bannon, and chief of staff, Reince Priebus, closely. The two men have become unlikely allies in the White House, often urging the president to stick to his populist message and campaign promises while his daughter Ivanka and other senior staffers prod him into pursuing a more centrist political agenda.

But Bannon and Priebus aren’t the only members of Trump’s inner circle who might be in jeopardy, the senior White House official told The Post.

“If I had to place a bet, I would say McGahn is in the most trouble,” the senior official said.

Trump’s top legal adviser has been with him since the campaign and was a key player in the events that led to the dismissal of both Comey and former national security adviser Mike Flynn, who was fired in February.

The official said McGahn’s relationship with Trump began to sour after Attorney General Jeff Sessions recused himself from the Justice Department’s investigation of Russian interference in the 2016 election.

“[Trump] never understood why McGahn and his team didn’t meet with Sessions to try and talk him out of removing himself,” the senior official said, noting that Trump saw the attorney general’s recusal as a concession to Democrats who were trying to score political points by demanding it in the first place.

Trump has previously characterized reports that he was frustrated with senior advisers as “fake news.” But in an interview with Fox News’ Jeanine Pirro last Thursday, the president seemed less inclined to throw cold water on rumors that some staffers are failing to meet his expectations.

“Are you moving so quickly that your communications department cannot keep up with you?” Pirro asked.

“Yes, that’s true,” Trump responded.