Help designing custom integration plugin

If all your users are Codeforces users, I would implement single sign on (where Codeforces is the auth provider). This way there is no extra authentication step needed and your users would have a better sign up / authentication flow as well. You could even sync the groups like this!

I would do this from the source, i.e. where Codeforces knows the rating has changed, have it make an API call towards Discourse to update the rating (or whatever user property is influenced by that rating). This way everything will be always up to date. When you need to synchronize stuff polling always leads to problems one way or another, so avoid it where you can and use an event based approach.