An earthquake of magnitude 5.7 was recorded off the coast of Papua New Guinea on Wednesday, the United States Geological Survey reported.