I've ridden in the UK several times (I have relatives there) and I just finished a ride in Ireland. While I haven't gone all the way to John O''Groats, I have started at Land's End and gone north to Fort William in Scotland (
journal here). Some comments:
1) I second the suggestion to use cycle.travel to plan your route. It is UK-centric, shows all kinds of bike paths, and is a good route planning tool. I also suggest asking routing questions at the UK Cycling forum. Here is a link to its touring section:
https://forum.cyclinguk.org/viewforum.php?f=16
2) The roads in the UK are not very wide, have no shoulders (verge), and often are poorly paved. Be sure that the roads you are planning to ride are ones you feel safe on. Often there isn't much choice, especially up in Scotland. In my early touring day, I used to enjoy finding routes on tiny UK roads using the UK road atlas. While it is possible, it often means meandering all over the countryside. Your route shows much time spent on the coast south of Edinburgh and Glasgow. Make sure these aren't on busy coastal roads. In the UK there are Motorways, A roads, B roads, lanes, and unrated roads. Stay off A roads if you can. I prefer to use B roads sparingly, unless I know for sure they are lightly trafficked. Lanes and unrated roads are my recommendation.
3) The route you've shown in Ireland doesn't seem very interesting, unless rolling green fields are your thing. Check out the Wild Atlantic Way that runs north-south along the western edge of Ireland for ideas. I'd add Connemara (area along the coast north of Galway) to your itinerary. Instead of riding to Dublin, I'd suggest riding down to Cork to take in some of the southwestern peninsulas. From Cork, I'd take the train to Dublin. Another option would be to ride to Rosslare on the southeastern coast and take the ferry to Fishguard (Wales) and ride from there.
4) Check out the Lon Las Cymru (The Welsh Way) that runs from Holyhead (the landing port of the ferry from Dublin) down to Chepstow, just across the bridge from Bristol. I rode this and wrote
a detailed journal, if you are interested.
5) England is well connected by trains. Generally, these trains will take bikes and have specific places for them. Usually, a train will only take a few bikes. I've always gotten a reservation for one of these spaces, though I've seen lots of bikes without reservations on these trains.
6) The UK and Ireland are hilly places. They don't have high mountains, but they have lots and lots of short, steep hills. Be sure to check the amount of daily climbing your routes do in a day.
7) I don't know your willingness to take a train to skip uninteresting segments (say through major metropolitan areas), but there are some sections of your route that might be better seen from a train so that you can spend more time in more interesting places.