The potshot: it's not exactly polite.
Plenty of popcorn-grabbing moments over the past few days as our tech overlords took potshots at each other.
— Lara O’Reilly, The Wall Street Journal, 3 Apr. 2018And on the whole, the show itself rarely veered from that course, with presenters lining up to deliver canned speeches and the occasional glancing potshot.
— Scott Meslow, GQ, 18 Sep. 2017
You probably wouldn’t like it if someone took this kind of potshot at you—being criticized is rarely fun, and a potshot is the type that seems to come out of nowhere or at an unpredictable time—but there's no question that the more objectionable potshot is the literal one.

We're not talking about this photographer's perfectly fine pot shot.
In its original use the word refers to a shot taken from ambush or at a random or easy target. That use dates back to the mid-19th century, and it's still around:
[A man] is facing firearms charges after he took a potshot at a neighbor's chicken that had made a habit of digging under his fence and entering his yard.
— Dan Glaun, The Springfield Republican, 1 Jan. 2016
The original use makes the shot in potshot obvious, but what about the pot part?
The term has its origins in the idea that casual shooting is unbefitting a true sportsman, and is in fact characteristic of a hunter whose effort is wholly pragmatic—to get something for the cooking pot. That's right: a potshot is (historically, anyway) a shot for the sake of the (cooking) pot.
It's something to be grateful for when the only thing being lobbed at you is criticism.