A Chinese naval officer recently gave an interview in which he described how the navy was testing the effect of underwater explosives set off in ports. Apparently, China recently conducted a test of the concept in an unidentified Chinese port that had to be largely empty for such a test because the navy reported that key piers and other facilities were damaged or destroyed by the shock wave generated by the explosion.
Such tactics were discussed and studied during the Cold War when it was believed the Soviet Union could get such a bomb, apparently nuclear, into enemy ports before war broke out and somehow kept hidden until remotely detonated. This was more a result of Cold War paranoia than useful tactics. It was concluded that the Soviets could get such devices in, and out of enemy ports on a regular basis but hiding the devices in a foreign port was not seen as practical or safe.
The situation may be substantially different now because a side effect of Chinas rapid economic growth has been Chinese port management firms exporting their expertise, often after a Chinese firm has purchased a controlling interest in a foreign port and brings in a Chinese port management company. This gives China a lot of control over what goes on in the port, even though local port police and port operation officials are still present.
Another change is that China now has large force of short-range ballistic missiles, some of them transported and launched from trucks, or railroad cars. These missiles have conventional warheads that are designed for special tasks, like destroying runways or penetrating the ground to destroy command or other bunkers. Conventional warheads can also be built to detonate underwater to do maximum damage with the resulting shockwave. This is what depth charges and some types of torpedo warheads do. This is a more likely reason for the “explosions in a port” test because enough non-nuclear warheads delivered by ballistic missiles used early in a war could cripple enough commercial and military ports to disrupt enemy naval operations and seaborne trade in general.