You should put the class check in all of your files, but modify one (usually in your main file, or the one that loads first) to disable the addon for characters who don't pass the class check, so you're not wasting time reading all the addon's files and class checking every time you log into that character:
Code:
local _, class == UnitClass("player")
if class == "WARLOCK" or class == "MONK" then
return DisableAddOn("ThisAddOn")
end