The 16-gauge end makes it unsafe.
No, it’s not safe.
The whole cord is only as strong as its weakest link. If the receptacle end—the part that actually makes the connection—is 16-gauge wire, then that’s what limits the current capacity. A 12-gauge cord can handle 20 amps, but 16-gauge is typically rated for 13 amps. Plug in something that draws 15 amps, and the 16-gauge end will heat up, melt, or start a fire.
This isn’t a minor detail. That receptacle end could be a badly made adapter, a