It is a wakizashi, if your measurements are correct. For sword nomenclature:
http://yakiba.com/Nomenclature.htm
Most likely Shinto period, certainly no older. Has a later Bizen feel to it, perhaps one of the later Yokoyama Bizen smiths.
Can't tell about flaws, though I see the tip is broken. Lots of rust, perhaps deep pitting ?? Any bends, chips, etc. will affect both value and restoration considerations and costs.
Can't say the tsuka is trash, haven't seen enough of it.
Restoration costs(polish, reshape kissaki, new shirasaya and habaki) IMHO would far outweigh any potential value. A polisher could give you a better idea. DO NOT use a self trained ametuer polisher, if you decide to polish it. For what it would cost to restore it, aprox. $2000-$2500, you could buy a sword already in good polish.
For example: Here is a Daisho (Two swords) in koshirae, one even papered for $3900:
http://yakiba.com/Daisho2_Sukesada-Masakiyo.htm