No, you didn't read that wrong: The hapless man from Plains and the man often ranked as one of the worst presidents in history are the two most effective Oval Office residents since Lyndon Johnson -- at least according to one metric.
Looking through AEI and Brookings' Vital Statistics on Congress (you can see 5 charts showing how big money created the most polarized Congress in a century here), I came across a fascinating table of data: "Presidential Victories on Votes in Congress, 1953-2012." It's a measure of how often Congress voted with the president divided by the number of votes on which he had taken a clear position. The results are rather surprising:
Naturally, LBJ, with his famed ability to cajole, plead, and pressure Congress into doing his will -- honed as Senate majority leader before he moved on to the vice presidency -- fares very well by this measure. But John F. Kennedy scores even better. Of course, Kennedy's numbers are somewhat skewed by his assassination-shortened tenure in office; on the other hand, the report scores 365 votes during the Kennedy Administration, much higher than the 214 in Gerald Ford's abbreviated term. Making Kennedy, Johnson, and Carter's numbers even more impressive is the fact that the sample size per year is unusually high for them. For George W. Bush, however, one of the other highest scorers, there were many fewer votes per year, on average.
Meanwhile, President Obama's numbers are, while not very good, perhaps better than expected -- and they edge George H.W. Bush, at least (the two have been compared). But Obama's number seems likely to sink. When he had a Democratic House in 2009 and 2010, he won a stunning 94.4 percent and 88.1 percent of votes there, compared to 31.6 in 2011 and just 19.7 last year. His Senate totals have also slid -- from 98.8 in 2009 to 79.7 in 2012 -- and will get even worse if Democrats lose seats or lose control of the chamber in 2014. Barring a Democratic resurgence in Congress, the average will continue to fall.
Now for the caveat -- and it's big one: Who cares? One could view it as a strange coincidence that two of the least-regarded presidents in recent history are also two of the most victorious in Congress. Or one could take it to mean that the obsession among some members of the commentariat with "leadership" -- usually shorthand for getting Congress to vote for something the president wants, regardless of what the substance or long-term effects of that policy might be -- is a misguided and misleading way to assess the quality of a president's tenure. This data doesn't provide enough to decide for sure, but it does seem to offer more ammunition to the latter school than the former.
As a quick corollary to that data, here's a table of presidential vetoes, along with attempts to override them -- both of which are in an historical trough.
This table has been updated to correct an error in Vital Statistics. Thanks to commenter Mark Benford for pointing out the mistake.