83% wp-vulnerability-scanner

Code Review | WP Vulnerability Scanner

WordPress plugin WP Vulnerability Scanner scored 83% from 54 tests.

About plugin

  • Plugin page: wp-vulnerability-...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.6
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: Aug 8, 2018
  • Number of updates: 7
  • Update frequency: every 66.3 days
  • Top authors: naeemshah450 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,030 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.46ms] Passed 4 tests

This is a short check of server-side resources used by WP Vulnerability Scanner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.87 ▼4.78
Dashboard /wp-admin3.31 ▲0.0050.97 ▼0.39
Posts /wp-admin/edit.php3.36 ▲0.0052.79 ▲0.45
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.67 ▲4.12
Media Library /wp-admin/upload.php3.23 ▲0.0038.74 ▲2.89

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WP Vulnerability Scanner: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▼913.25 ▼0.284.84 ▲2.8641.41 ▼2.56
Dashboard /wp-admin2,202 ▼45.84 ▲0.95104.54 ▼12.1543.22 ▼0.16
Posts /wp-admin/edit.php2,091 ▼12.05 ▲0.0338.89 ▼18.7834.46 ▼6.71
Add New Post /wp-admin/post-new.php1,516 ▲217.65 ▲0.09749.79 ▲114.6260.40 ▲7.60
Media Library /wp-admin/upload.php1,390 ▲24.28 ▲0.0696.28 ▼8.7142.68 ▼1.76

Uninstaller [IO: ✅] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-vulnerability-scanner/class.scanner.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: wpscan vulnerability database, wpscan, vulnerability scanner, security, prevent hacking

wp-vulnerability-scanner/wp_vulnerability_scanner.php 69% from 13 tests

The principal PHP file in "WP Vulnerability Scanner" v. 1.4.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")
  • Domain Path: Please prefix the domain path with a forward slash character ("/")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-vulnerability-scanner.php" instead of "wp_vulnerability_scanner.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin145 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25014140
JavaScript1105

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin