I posted the same a few days ago and people have commented some suggestions.
What i currently do is save the original firmware file along with a archive backup. You can make a archive backup via advanced settings, Luci.
Then when you flash the firmware you can head back to advanced settings, Luci and restore the compressed archive backup. The restore will put back your config files but not any 3rd part plugins. You would then go back to Luci and reinstall any plugins you had and because you have restored the configs via the archive your plugins will have their settings intact.
You can view my post here to see what others have suggested so far.