Hi Ahmad,
I see you haven't been getting any responses to your question, and I suspect that's because nobody has a definitive answer to give you.
First off, it might help to double-check the information you're getting from your Battery-Life app; I haven't heard of it before myself. There's one that's popular with repair technicians that I'd suggest you download and try out; it's called coconutBattery and seems to be well-respected.
coconutBattery 3.9 - by coconut-flavour.com
Give that a try then come back and post some screenshots so we can be sure it's not just a glitch in your app that we're seeing. Once we've confirmed what Battery-Life is reporting, I'd say the next step is probably to try another battery. The symptoms you're describing would seem to be related to the BMS, or Battery Management System, that's built into the battery. That system is responsible for reporting the battery's state to the logic board, so a defective BMS can cause all kinds of weird symptoms.
The sad truth is that some aftermarket batteries are just made cheaply and don't work well, while others, even the best-made ones, can fail at times. I don't know what kind of replacement you got, but it would be worthwhile to invest in one from a reliable supplier like iFixit who stands behind their product. If, for instance, you did buy the battery here, there's a one year warranty on it and the customer service department here is responsive and will do what it takes to make things right so I'm sure you could easily get a replacement at no cost.
So yeah, see what coconutBattery has to say about your phone, then consider a replacement battery. If that still doesn't work, about the only other thing left to try would be replacing the dock connector assembly.
Once those two parts have been replaced, all that's left as a possible source of the problem are chips on the logic board, the repair of which is generally beyond the capability of us home DIYers.
P.S., While browsing the Dock Connector Replacement guide, one of the steps says to do a hard reset on the phone after replacing the battery. If you haven't done that, give it a try; at this point it can't hurt.
Good luck with your repair; let us know what you find.