Replace SMA Connectors with Direct Connection
It would probably be ok.
The loss in the connectors and the cable is probably negligible.
I would make sure that the impedance of the PCB trace is the same as the connectors and cable to avoid mismatch between in- and output of the circuits.