By themselves, the numbers do not explain the decline in leadership scores. Mr. Wray was largely unknown to most agents when he came into office during one of the most tumultuous times in F.B.I. history. He brought with him a fresh leadership team and a more low-key style than his predecessor. He has also opted not to spar publicly with Mr. Trump, even as the president has attacked the bureau and accused agents of being part of a “witch hunt” against him.

Neither the overall positive results nor the declining leadership scores back up Mr. Trump’s version of events, in which he brought in Mr. Wray to stabilize a wobbly, discredited agency.

The figures were obtained through a public records request by the blog Lawfare, which conducted its own analysis and shared the raw data with The New York Times.