What is your reference image? You need one to compute MSE. You can use the immse() function in the Image Processing Toolbox.
You can use imfinfo() to determine both the file size and the size in your MATLAB program. The sizes may be different if the file had been compressed, like it was stored in JPG format.