His approval ratings are low. A Quinnipiac University poll in November found that nearly half of New Yorkers don’t believe he deserves re-election.

His policies on the growing homeless problem are ineffective.

He has not addressed what a recent report by the city’s Department of Investigation has called “systemic” problems with the Administration for Children’s Services, which has failed to protect some of the city’s most vulnerable residents.

His 2013 campaign fundraising is under investigation by the feds. Last week, he was questioned for nearly two hours by Manhattan prosecutors.

Despite the city’s low crime rate, he has made the NYPD less transparent by supporting a state law that he claims prohibits the department from releasing cops’ disciplinary records, even in cases that involve civilian deaths.

Yet Mayor Bill de Blasio has an important ally who is certain to improve his approval ratings, someone whose actions the mayor knows how to exploit: President Donald Trump.

In short, the more Trump is Trump, the more he helps de Blasio.

“He likes to go macro,” ex-city councilman and mayoral campaign rival Sal Albanese says of de Blasio. “It distracts people from his own poor record.”

When Trump declared war last week on “sanctuary cities” that refuse to help the feds apprehend immigrants here illegally, de Blasio thundered, “We are going to defend all of our people regardless of where they come from and regardless of their documentation status.”

After Trump announced his executive order on immigration, which bans Syrian refugees and blocks Muslims from seven war-torn countries for 90 days, de Blasio released this statement: “The United States has been a beacon of hope to the world. We are a country founded on the belief of religious pluralism and equality. Today the President sent a shamefully different message . . . In this great city of immigrants we will remain true to our values and always welcome all who yearn to breathe free.”

After a federal judge stayed parts of Trump’s order, the mayor repeated his sentiments on CNN, and updated his schedule to deliver remarks against the president’s move.

As insufferable as de Blasio may appear to be, how can any New Yorker not applaud those words?