A three-question survey has been pinging New Yorkers’ cellphones, asking them to rate the job the NYPD is doing. But the pop quiz is costing taxpayers $1.5 million, with a murky money trail and ties to an ex-police commissioner’s crony, and the results will remain hidden behind a blue wall of silence.

“We get some real-time feedback about how people feel about their police department and it’s important,” NYPD Commissioner James O’Neill said last month at the annual State of the NYPD address.

The program was championed by John Linder, a pal of former Police Commissioner Bill Bratton and a highly paid NYPD consultant.

But the NYPD didn’t hire the private company doing the polling work, nor did the mayor’s office. Instead, city money was funneled to John Jay College of Criminal Justice through an agreement with the CUNY Research Foundation.

The foundation, which is supposed to fund academic studies, has been under state scrutiny for its spending.

By sending the money through CUNY, the city did not have to seek competing bids or proposals from polling firms.

A start-up company called Elucd was chosen for the no-bid contract.

The funding stream was so convoluted that Michael Simon, an Elucd co-founder, claimed not to know who was paying for his services when contacted by a Post reporter. “All I can tell you is we get paid by John Jay,” Simon said.

A John Jay spokeswoman referred questions about the contract to City Hall.

“Elucd had already built the platform we were seeking to apply to different areas of government work,” said Patrick Gallahue, a spokesman for the Mayor’s Office of Criminal Justice. “This contract followed the standard and approved processes for contracting.”

The NYPD calls the quickie cellphone surveys a “sentiment meter,” and says they are a vital component of the department’s emphasis on neighborhood policing.

The surveys — which appear as pop-up ads on 50,000 different smartphone apps — ask users if they feel safe, trust the police and are confident in the NYPD.

Results can be sorted by neighborhood. Precinct commanders can use the data to modify deployments and “build relations between police and communities,” the city says.

The NYPD will not make any of the poll results public.

A New Mexico resident who once worked at the MTA and consulted for Bratton when he was Los Angeles police chief, Linder was paid $255,239 by the NYC Police Foundation in the 2016 fiscal year.

The nonprofit would not provide his current compensation.

As an influential consultant at the foundation, Linder pushed for the project but does not have a stake in Elucd, according to a foundation spokesman.

Linder did not return calls for comment.