You could use the ratios of bugs (or any other variable) divided by lines of code (LOC). Since ratios may vary a lot for instance bugs vs. vulnerabilities the resulting plot oftentimes doesn't look as good so you could use a normalization procedure, in fact, is the recommended procedure.
In your case Bugs and a few vulnerabilities divided by LOC doesn't look too bad so I included the plot of raw ratios too in this example. I'm using a count overlapping points plot which is a variant of a barplot that doesn't fill bars and only cares about the value as a point. You could use any normalization that you feel gives you the best result. Here I'm only centering the data. In both plots the highest value means higher complexity according to the ratio metric.
Raw Ratios of variables divided by LOC
Normalized Ratios of variables divided by LOC
Code in R needed to replicate these plots
require("reshape2")
require("ggplot2")
df1 <- data.frame(App = c("SweetApp", "SourApp", "SaltyApp"),
LOC = c(10000, 5660000, 1500),
Bugs = c(10, 120, 55),
CodeSmells = c(50, 30, 20),
Vulnerabilities = c(2, 3, 10))
#Define ratios
df1$RatiosBugs <- df1$Bugs / df1$LOC
df1$RatiosCodeSmells <- df1$CodeSmells / df1$LOC
df1$RatiosVulnerabilities <- df1$Vulnerabilities / df1$LOC
#Normalize Ratios
df1$NormRatiosBugs <- scale(df1$RatiosBugs, scale = FALSE)
df1$NormRatiosCodeSmells <- scale(df1$RatiosCodeSmells, scale = FALSE)
df1$NormRatiosVulnerabilities <- scale(df1$RatiosVulnerabilities, scale = FALSE)
dfRaw <- df1[, c("App", "RatiosBugs", "RatiosCodeSmells", "RatiosVulnerabilities")]
dfNorm <- df1[, c("App", "NormRatiosBugs",
"RatiosCodeSmells", "RatiosVulnerabilities")]
dfRaw.m <- melt(dfRaw, id.vars = c("App"))
dfNorm.m <- melt(dfNorm, id.vars = c("App"))
#Plot Raw Ratios
ggplot(dfRaw.m, aes(App, value)) +
geom_count(aes(color = variable), position = position_dodge(width = 0.4), stat = "identity")
#Plot Normalized Ratios
ggplot(dfNorm.m, aes(App, value)) +
geom_count(aes(color = variable), position = position_dodge(width = 0.4), stat = "identity")