Battery status changed from "Replace Now" to working ok

Hi, My Macbook Pro Late 2011 suddenly had charging issues. The battery would not charge and the charging light was a constant green on the Magsafe charger. Macbook would not load past boot screen, I tried a list of things to try fix issue including resetting NVRAM but long story short, the only way I could use the machine was by using it in Safe Mode. (Also, battery status on screen was showing "Replace Now"). I got by for about a month using Safe Mode, but the battery was still the same: Not charging. I could only ever use the Macbook while it was connected to charger. If i accidentally disconnected the charger from the Macbook, the machine shut off.

Fast forward about a month, I again, accidentally disconnected the Charger from the Macbook, but this time the Macbook stayed on. The battery was holding its charge. I restarted the machine, it booted normally without issue, and there is no "Replace Now”on battery status. Everything seems to be as normal, battery discharging/charging as it once was.

Is this a battery issue or something like a DC charging port issue?

The issue seems to have resolved itself for now, but I would like to know how to prevent it happening again. This is the second time this scenario has happened within 6 months.

The battery itself is a third party battery, but only just over 1 year old, and was given proper attention when first installed.

MacBook Pro (15-inch, Early 2011), High Sierra, 2.2 GHz Intel Core i7

Thanks.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2942205:01crwdne2942205:0:

Let’s get a better view of things, install this gem of an app! CoconutBattery take a snapshot of the apps main window and post it here for us to see Adding images to an existing question

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0