In the latest Gallup Confidence in Insti tutions poll, Congress ranked dead last out of the 16 institutions rated — and that was before l’affaire Weiner and the indictment of former Sen. John Edwards, which can only help to drop the numbers even further.

In this the public may only be catching up with Mark Twain, who quipped, “Suppose you were an idiot and suppose you were a member of Congress — but I repeat myself.” Will Rogers addressed the consequences of these deficiencies: “When Congress makes a joke, it’s a law, and when they make a law, it’s a joke.”

There are many examples of the joke being on us.

A friend tells of sitting at a banquet table with family of then-Rep. Dan Glickman, later secretary of agriculture. The relatives expressed relief at his having entered politics because none of them thought Dan was smart enough to enter the family business — auto shredding and scrap metal.

I myself attended a symposium that Rep. Tom Bliley, then chairman of the powerful House Commerce Committee, addressed via teleconference. Reading a prepared statement, he included the “stage instructions” — such as “pause for emphasis” — that his speechwriter had inserted. Where one line had accidentally been duplicated, Bliley read it a second time.

Rep. John Salazar related this anecdote: “You know, when I was debating what became the 2008 Farm Bill, I had a member of the Ag Committee actually ask me if chocolate milk really comes from brown cows. I asked if he was joking, and he assured me he wasn’t.” A member of the Agriculture Committee?

Rep. Sheila Jackson Lee proclaimed on the House floor last July that “victory had been achieved” by the United States in the Vietnam War and that “today, we have two Vietnams: side-by-side, north and south, exchanging and working.” In fact, South Vietnam fell three years after Lee graduated from college.

Lee is a member of the House Foreign Affairs Committee.

It was also Lee who asked a NASA scientist whether the Mars Pathfinder probe had photographed the flag that astronaut Neil Armstrong had left behind in 1969.

Maybe we should treat dissatisfaction with our representation as a medical, rather than a solely political, issue — and ask candidates and incumbents to volunteer for periodic intelligence and mental-status testing. We give exams to policemen, bus drivers and even hairdressers — why not politicians?

After all, we often demand to know whether a candidate has recovered from open-heart surgery, cancer or a stroke — and many states require elderly drivers to be re-licensed. Isn’t control over the nation’s coffers and the responsibility for declaring war as important as the ability to drive a car?

H.L. Mencken once observed, “Congress consists of one third, more or less, scoundrels; two thirds, more or less, idiots; and three thirds, more or less, poltroons.” Testing might help us to weed out a few idiots.

Of course, getting rid of the scoundrels, poltroons and Internet sex addicts may be more difficult.

Henry Miller is the Robert Wesson Fellow in scientific philosophy and public policy at Stanford University’s Hoover Institution.