| @@ -50,10 +50,8 @@ | ||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Removes settings for all submodules. |
| 54 | - * | |
| 55 | - * @return mixed | |
| 56 | 54 | */ |
| 57 | 55 | public function remove_settings() { |
| 58 | 56 | } |
| 59 | 57 | |
| @@ -58,10 +56,8 @@ | ||
| 58 | 56 | } |
| 59 | 57 | |
| 60 | 58 | /** |
| 61 | 59 | * Delete all the data & the cache. |
| 62 | - * | |
| 63 | - * @return mixed | |
| 64 | 60 | */ |
| 65 | 61 | public function remove_data() { |
| 66 | 62 | } |
| 67 | 63 | |
| @@ -101,19 +97,32 @@ | ||
| 101 | 97 | |
| 102 | 98 | if ( isset( $scan_item_group_total[ Scan_Item::TYPE_INTEGRITY ] ) ) { |
| 103 | 99 | $data['WP core issue count'] = $scan_item_group_total[ Scan_Item::TYPE_INTEGRITY ]; |
| 104 | 100 | } |
| 105 | - | |
| 106 | 101 | if ( isset( $scan_item_group_total[ Scan_Item::TYPE_SUSPICIOUS ] ) ) { |
| 107 | 102 | $data['Suspicious Code'] = $scan_item_group_total[ Scan_Item::TYPE_SUSPICIOUS ]; |
| 103 | + // Additional JS file count if found. | |
| 104 | + $items = $last_scan->get_issues( Scan_Item::TYPE_SUSPICIOUS, Scan_Item::STATUS_ACTIVE ); | |
| 105 | + $count_js_files = 0; | |
| 106 | + foreach ( $items as $item ) { | |
| 107 | + if ( | |
| 108 | + isset( $item->raw_data['file'] ) && is_file( $item->raw_data['file'] ) && | |
| 109 | + 'js' === strtolower( pathinfo( $item->raw_data['file'], PATHINFO_EXTENSION ) ) | |
| 110 | + ) { | |
| 111 | + ++$count_js_files; | |
| 112 | + } | |
| 113 | + } | |
| 114 | + if ( $count_js_files > 0 ) { | |
| 115 | + $data['JS file Detection'] = $count_js_files; | |
| 116 | + } | |
| 108 | 117 | } |
| 109 | 118 | |
| 119 | + if ( isset( $scan_item_group_total[ Scan_Item::TYPE_VULNERABILITY ] ) ) { | |
| 120 | + $data['Vulnerability'] = $scan_item_group_total[ Scan_Item::TYPE_VULNERABILITY ]; | |
| 121 | + } | |
| 122 | + | |
| 110 | 123 | if ( isset( $scan_item_group_total[ Scan_Item::TYPE_PLUGIN_CHECK ] ) ) { |
| 111 | 124 | $data['Plugin file modified'] = $scan_item_group_total[ Scan_Item::TYPE_PLUGIN_CHECK ]; |
| 112 | - } | |
| 113 | - | |
| 114 | - if ( isset( $scan_item_group_total[ Scan_Item::TYPE_VULNERABILITY ] ) ) { | |
| 115 | - $data['Vulnerability'] = $scan_item_group_total[ Scan_Item::TYPE_VULNERABILITY ]; | |
| 116 | 125 | } |
| 117 | 126 | |
| 118 | 127 | $is_closed = false; |
| 119 | 128 | $is_outdated = false; |