The fresher the beer, the better. It just gets worse over time. The more sunlight that directly hits the beer, the faster it gets bad. That's why beer comes in brown and green bottles, to protect it from the sun. Beer in clear bottles should be kept out of the light as much as possible. Even beer in kegs, casks or cans does get worse, but at a slower rate. You're pretty safe with American beer, that shit is cold filtered to hell because of the FDA and there are lots of preservatives added to the malt during the brewing process. If you were drinking an unfiltered 1516 accordance beer that was 2 years old, that would be awful.
It probably tastes bad because the taste of porters is a bit harder to appreciate or acquire compared to a light lager. I wouldn't sweat it. Get crunk.