From 1948 to 1996, Massachusetts used to be more D than New York. Nowadays, both states are equally D.
However, Massachusetts doesn't elect Republican representatives because there is no strong spatial concentration of party strengh.
In New York, there are some Republican districts in the countryside. NYC is more than 80% Democratic.
It's also possible that New York might vote more Democratic than Massachusetts in 2016, especially with Hillary Clinton as the Democratic nominee.
It already did by 3% in 2012. It will almost certainly be a better state for Hillary than Mass. in 2016.