78% vulners-scanner

Code Review | Vulners Scanner

WordPress plugin Vulners Scanner scored78%from 54 tests.

About plugin

  • Plugin page: vulners-scanner
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 21, 2021
  • Latest release: Aug 8, 2021
  • Number of updates: 10
  • Update frequency: every 5.0 days
  • Top authors: vulnersdevelopers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼1.26ms] Passed 4 tests

This is a short check of server-side resources used by Vulners Scanner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1238.28 ▲2.09
Dashboard /wp-admin3.44 ▲0.1349.19 ▲1.66
Posts /wp-admin/edit.php3.55 ▲0.1945.87 ▼0.24
Add New Post /wp-admin/post-new.php6.04 ▲0.1586.51 ▼8.55
Media Library /wp-admin/upload.php3.36 ▲0.1342.03 ▲9.61
Vulners Scanner /wp-admin/admin.php?page=vulners-scanner/scanner.php3.3331.11
Vulners Settings /wp-admin/admin.php?page=vulners-settings3.3330.36

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
vulners_os_audit_result
vulners_os_audit_last_changes
vulners_plugins_audit_last_changes
widget_recent-posts
vulners_plugins_audit_result
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Vulners Scanner: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8222.82 ▲8.261.64 ▼0.0445.48 ▲4.66
Dashboard /wp-admin2,252 ▲7213.79 ▲8.12296.01 ▲207.7681.49 ▲41.68
Posts /wp-admin/edit.php2,154 ▲5411.25 ▲9.23136.74 ▲101.8441.31 ▲8.91
Add New Post /wp-admin/post-new.php1,569 ▲4132.89 ▲9.72663.32 ▼23.7629.70 ▼27.66
Media Library /wp-admin/upload.php1,451 ▲5113.11 ▲8.86199.94 ▲103.5273.24 ▲26.85
Vulners Scanner /wp-admin/admin.php?page=vulners-scanner/scanner.php1,00312.84229.0843.67
Vulners Settings /wp-admin/admin.php?page=vulners-settings85610.84126.6725.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/vulners-scanner/index.php
    • > /wp-content/plugins/vulners-scanner/templates/report.php
    • > /wp-content/plugins/vulners-scanner/scanner.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=vulners-scanner/scanner.php
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=vulners-scanner/scanner.php
    • > Console-api (warning) in unknown
    webpack://vulners-wp-plugin/./node_modules/mobx/dist/mobx.esm.js? 1826:107 "[MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ScanStore@1.pluginsError"
    • > GET request to /wp-admin/admin.php?page=vulners-scanner/scanner.php
    • > Console-api (warning) in unknown
    webpack://vulners-wp-plugin/./node_modules/mobx/dist/mobx.esm.js? 1826:107 "[MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ScanStore@1.pluginsLoading"
    • > GET request to /wp-admin/admin.php?page=vulners-scanner/scanner.php
    • > Console-api (warning) in unknown
    webpack://vulners-wp-plugin/./node_modules/mobx/dist/mobx.esm.js? 1826:107 "[MobX] Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ScanStore@1.pluginsLastScan"
    • > GET request to /wp-admin/admin.php?page=vulners-settings
    • > Javascript (severe) in unknown
    webpack://vulners-wp-plugin/./node_modules/react-dom/cjs/react-dom.development.js? 26085:12 Uncaught Error: Target container is not a DOM element.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: external, vulnerability assessment

vulners-scanner/index.php 85% from 13 tests

The main file in "Vulners Scanner" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 236 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("vulners-scanner.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,548 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP52302101,334
JavaScript16947331,209
SVG1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity5.00
▷ Maximum class complexity28.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods323.08%
▷ Public methods1184.62%
▷ Protected methods215.38%
▷ Private methods00.00%
Functions33
▷ Named functions2472.73%
▷ Anonymous functions927.27%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin