Hello isaacjacob123,
As dwb says it is no problem to leave the cord in overnight, maybe for the electricity bill and enviromental reasons, but not you're Mac.
Also: I use Battery Health (available on the app store for free) to moniter my battery's Health. As over time you're battery will loose the ability to fully charge, thus it will not last as long as when you bought it.
When I think my Macbook should perform longer, I adjust my screenbrightness, my preference is three bars from max, but it differs from what Macbook I am using.
And if you use a pro with 2 videocards you could use the app gfxCardStatus to set the used videocard to the integrated GFC. This will get you longer battery life for sure.