LED Downlight, in a box, on the wall, with lamp wire?
If this is using bare wire and nuts, you'll need a (shallow plastic) old-work box to hold the junction between the fixture and the cord.  The Edison-base-connection doesn't need such treatment, but in either case, you'll need to make sure that this rig is mounted securely, and has no exposed metallic parts (since there's no ground wire).

The flexible cord is OK, BTW, as per NEC 400.7 point 2 (i.e. a luminaire-to-nearby-outlet connection).  Also, the LED shouldn't care about being in a small-ish box nor about mounting orientation -- it's also a wet location rated fixture, so it can go in the bathroom without worries there.