At heavyweight I believe that Muhamad Ali holds the record closley followed by joe Louis with anybody else a distant third. They both beat 30+ ranked contenders which is nearly twice as much as any other lineal champion. In that sense the asumption that they are #1 and 2 at heavyweight is upheld Other heavyweights with 30+ fights against ranked oponents include Bob Satterfield and Turkey Tomphson. Other champions who score high in this regard include some obvious names like Lewis and Holmes and some not so obvious ones like Mike Tyson and Jack Sharkey who are often criticised for lack of longevity.
OLD FOGEY has done a lot of analysis on this sort of thing. There are non champions who fought similar levels of competition to Ali and Louis such as Satterfield but their records have the scars to show for it. There are non champions who did most of their work before rankings were introduced who would probably rival Louis and Ali if rankings had existed throughout their careers. I am talking specificaly about Sam Langford and Harry Wills.
Without looking them all up: 40 or more--Sugar Ray Robinson (45), Archie Moore (44), Ezzard Charles (40) 30 or more--Henry Armstrong, Emile Griffith, Ike Williams, Muhammad Ali, Joe Louis, Manuel Ortiz 20 or more--Willie Pep, Carlos Ortiz, Jake LaMotta, Jimmy Bivins, Joey Maxim, Jack Sharkey, Kid Gavilan, Joey Giardello, Harold Johnson These are taken from the Boxing Register mainly, with a little guesswork on my part on some of the old fellows. Harry Greb and Sam Langford would have rated in the top echelon if there were ratings for most of their careers. Harry Wills would also rate very high. Tommy Loughran and Teddy Yarosz, each of whom defeated 10 world champions, probably would be in at least the 20's or 30's if records were available. Several recent champions, such as Roberto Duran, Larry Holmes, Lennox Lewis, and Mike Tyson will probably break into these lists when the Boxing Register goes over their careers. As for percentages, Joe Louis at 31-3 is the highest of anyone who beat at least 30 ranked contenders. Ali is 33-5. Pep at 27-8 ranks highest of those in the 20's. Carlos Monzon (15-0) and Rocky Marciano (11-0) are the only fighters to defeat more than ten ranked contenders without suffering a loss in these fights. On the other end of the scale, Carlos Zarate was only 4-3 against ranked opposition. Ingemar Johansson was 3-2.