Installing a Kasa smart switch
Yes, what you say looks right. This work is competent.  The white wire was brought up to supply the fan, not for the neutral rule. 

Get my secret weapon, a 5-pack of nulticolored electrical tape.  By happy accident, every wire is correctly color coded but one.  


white is neutral
lower cable black is always hot
lower cable red is switched hot 1 (for the outlets)
upper cable black is switched hot 2 for the fan, mark it with blue tape 
upper cable red is spare, tag it some other color e.g. Yellow 


Of course you know the bare ground wire does not go to the same terminal as a hot...