Chosen Solution

The 60W MagSafe 2 metal connector end that plugs into the computer gets very overheated while charging, to the point that when touched it feels like it might burn me. It overheats rapidly once it’s plugged in, and cools down rapidly once unplugged. The macbook battery has been replaced recently and seems to be working fine. Coconutbattery shows nothing concerning as far as I can tell. I’m not doing anything that takes much power while it’s charging. This happens whether the computer is turned on or off while charging. Mac diagnostics shows no codes other than PPT004, which I expected since it’s an ifixit battery installed.Edit- upon taking zoomed in photos of charging port and charger end, it looks like the charging port is dirty or discolored, and at least one of the pins seems dirty or discolored. Not sure which. The charger pins and area under them seems dirty or discolored as well. Is there a safe way to clean the port? Does it seem like either the charger or the computer’s charging port should be replaced?

I would clean the systems MagSafe socket making sure there is no junk which limits the full insertion of the plug. The condition of the chargers cord and being a real Apple unit would be the next thing I would check. Lastly, replace the MacBook Pro 13" Retina (Late 2013-Early 2015) MagSafe 2 DC-In Board following this guide MacBook Pro 13" Retina Display Early 2015 MagSafe DC-In Board Replacement Basically, the pathway has too much resistance which is why the connection is getting hot