We study two-dimensional translation-invariant CSS stabilizer codes over prime-dimensional qudits on the square lattice under twisted boundary conditions, generalizing the Kitaev Zp toric code by augmenting each stabilizer with two additional qudits. Using the Laurent-polynomial formalism, we adapt the Gr\"obner basis to compute the logical dimension k efficiently, without explicitly constructing large parity-check matrices. We then perform a systematic search over various stabilizer realizations and lattice geometries for p∈{3,5,7,11}, identifying qudit low-density parity-check codes with the optimal finite-size performance. Representative examples include [[242,10,≤22]]3 and [[120,6,≤20]]11, both achieving kd2/n≤20. Across the searched regime, the best observed kd2 at fixed n increases with p, with an empirical relation kd2=0.0541n2lnp+3.84n, compatible with a Bravyi--Poulin--Terhal-type tradeoff when the interaction range grows with system size.