Hi! Sorry for delay in response. I’ve been away from the keyboard for a couple of days.
I have indeed implemented a workaround to avoid timeouts but it involves running a program outwith WordPress so is not a ‘proper’ solution.
I have replaced the action/function ‘link_library_reciprocal_link_checker’ with an action/function of my own which is largely the same as yours except when the check_type is ‘broken’ instead of calling the function CheckReciprocalLink, I call a function of my own.
Instead of actually checking the url, this function opens a scratch file and writes details of the link (name and URL) to this file.
Then, at the end of the link_library_reciprocal_link_checker function, after all the link details have been written to the scratch file, I output a hyperlink that links to en external program that reads the links from the scratch file and checks them.
I tried to get this program to work as a function within WordPress but, although I managed to get it to work on my test site (which has just 65 links) I failed to get it to work on my live site, which has 138 links. I tried checking the links in batches but that didn’t work either. I managed to get two batches to run, checking links 1-20 and then links 21-40 but when I tried to add in a third batch, checking links 41-60, the processed failed again (I get a ‘Server Error’).
I think that if you could add a parameter to your broken link checking process, so that the user specified how many links to check at one go, then that might work. First click would check and report on the first batch of links and then display a ‘Continue’ button. Clicking on ‘Continue’ would then check the next batch of links and so on.
If you decide to try developing something like that, I’d be happy to help test it out for you.