Size becomes meaningless with subatomic particles
Protons and neutrons are made of triplets of smaller particles known as quarks. It could be argued that a quark is of similar size to an electron but when dealing with fundamental particles the concept of size loses meaning. The same is true when considering photons. All subatomic particles, although called "particles", also have the properties of being waves (thus having wavelengths and frequencies). This is sometimes called wave-particle duality and this further muddies the water when talking about size.
It therefore isn't possible to give dimensions of quarks, electrons or photons - in fact, individual quarks cannot even be isolated.
Therefore, I don't think there is a meaningful answer to your question, although string theory proposes that everything, including quarks, electrons, and photons, are composed of minute strings of energy vibrating at individual frequencies. This theory, however, has not been proved.