Each combatant gets 1 action, a bonus action if they have a power to use it, a reaction, and movement equal to their racial movement ability.
The rogue has way too many actions.
On action 1, do they have advantage or a buddy in melee? If so then they get SA. Action 2 if they have used SA, they don't get it again. Their bonus action is used to make this attack (see note below, this cannot be done with the longsword). Action 3 is impossible as they have no actions remaining. Action 4 is permissible, though it would provoke an opportunity attack. The rogue is left with some remaining movement but nothing else to do.
Also unless your rogue is human, and has taken a feat at L1, it cannot attack with TWF using a longsword. TWF requires light weapons be wielded in both hands.
So we have:
- Action: attack
- Bonus action: attack with off hand weapon
- invalid, both bonus and regular action used.
- Ok, but eats opportunity attack
- invalid, both bonus and regular action used.