output total number of plugins and themes

This commit is contained in:
Christian Mehlmauer
2013-02-08 00:13:27 +01:00
parent a8a556464b
commit a07d55f1ab
7 changed files with 45 additions and 0 deletions

View File

@@ -69,4 +69,10 @@ module WpPlugins
plugins.sort_by { |p| p.name }
end
def plugin_vulns_count(file=PLUGINS_VULNS_FILE)
xml = Nokogiri::XML(File.open(file)) do |config|
config.noblanks
end
xml.xpath("count(//plugin)").to_i
end
end

View File

@@ -56,4 +56,10 @@ module WpThemes
themes.sort_by { |t| t.name }
end
def theme_vulns_count(file=THEMES_VULNS_FILE)
xml = Nokogiri::XML(File.open(file)) do |config|
config.noblanks
end
xml.xpath("count(//theme)").to_i
end
end