Yes, there's an on-prem version of CodeScene that can be run on private servers. The latest release is described here: https://codescene.com/blog/architectural-analyses-simplified...
To analyse Perforce, you setup an automated conversion to a read-only Git repo that you then point the analysis to.