I can tell you the Star Trek: The Next Generation: Writer's and Director's Guide says nothing on the subject and neither does their technical guide.
It's not hard to make a universal docking port. Generally a docking port is a flat surface with a hatch in it that's big enough to walk through. A docking port like this is seen in the movies on the refitted Enterprise. That will be compatible with anything that's big enough.
The other part of a docking port (and it's hard to know which side is the male and which is the female part) is usually a docking ring (but it could be in another shape) that joins to the flat surface around the hatch on the other ship. There are several ways this docking ring can be joined to the flat hull on the other ship. They could use a vacuum seal or an electromagnetic seal (or probably other methods, too).
Also, and I can't remember when I saw this, I remember in one episode a docking ring is extended to mate with a small ship, like a shuttlecraft, where the hull isn't flat, but has an angle in it, but the docking ring was flexible enough to conform to the shape of the hull.
If we look at docking ports with this knowledge, then all it takes to make sure two ports are compatible is to make sure the ring covers an area larger than the hatch on the other ship and is flexible enough to mate with ships where the hull near the hatch may be angled or not exactly a plane. Since the Enterprise deals almost exclusively with humanoids, who almost all use a rectangle about the same size for a hatch, the docking port will be compatibile with any ships with inhabitants in that "range" of size.
So the Enterprise has docking ports or facilities that will be compatible with almost all ships, not just in the Federation, but throughout the galaxy. But it won't be compatible with a ship that has a hatch that is, say, 20' by 20' unless they have larger docking rings we haven't seen.