This is definitely NOT a violation. This isn't part of an electrical installation and the N.E.C. doesn't govern paper-weights. If it were part of an electrical installation, I'd be much more concerned about the missing side of the box!

Dave