I'm pretty sure it's against code in CA to install an extension cord permanently inside a structure or conduit like that.
When I put all the cables in the wall for my TV, I ran Romex from the bottom junction box to the top junction box, despite the bottom junction box having a male electrical plug. An extension cord plugs into that from another outlet. (Ideally I would have just hardwired the upper outlet, but that would have been another can of worms.)