78% wp-scanner

Code Review | WP Scanner - Performance and Security

WordPress plugin WP Scanner - Performance and Security scored78%from 54 tests.

About plugin

  • Plugin page: wp-scanner
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.1
  • WordPress version: 6.3.1
  • First release: May 1, 2016
  • Latest release: May 30, 2016
  • Number of updates: 11
  • Update frequency: every 2.9 days
  • Top authors: A5hleyRich (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /9,476 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.45ms] Passed 4 tests

This is a short check of server-side resources used by WP Scanner - Performance and Security
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.41 ▲0.38
Dashboard /wp-admin3.33 ▼0.0248.43 ▼14.88
Posts /wp-admin/edit.php3.38 ▲0.0250.08 ▲0.97
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.96 ▼19.72
Media Library /wp-admin/upload.php3.25 ▲0.0234.06 ▲0.41
WP Scanner /wp-admin/options-general.php?page=wp-scanner3.2532.07

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Scanner - Performance and Security
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.22 ▼1.472.10 ▼0.1145.28 ▲2.65
Dashboard /wp-admin2,218 ▲275.76 ▼0.15106.27 ▲4.0042.79 ▼2.48
Posts /wp-admin/edit.php2,103 ▲112.02 ▲0.0036.02 ▼5.9537.36 ▲0.10
Add New Post /wp-admin/post-new.php1,547 ▲2823.08 ▼0.14656.89 ▼5.3349.96 ▼5.47
Media Library /wp-admin/upload.php1,403 ▲184.23 ▼0.0397.04 ▼7.1943.97 ▼0.40
WP Scanner /wp-admin/options-general.php?page=wp-scanner8102.0724.7032.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-scanner/views/notice.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-scanner/views/settings-page.php:32
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/wp-scanner/views/notice.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-scanner/views/key-field.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-scanner/views/status-field.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-scanner/views/secret-field.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-scanner/wp-scanner.php Passed 13 tests

The main PHP file in "WP Scanner - Performance and Security" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
46 characters long description:
WordPress performance and security monitoring.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected548 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11175325513
JavaScript27035

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.40
▷ Minimum class complexity3.00
▷ Maximum class complexity24.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods52
▷ Static methods11.92%
▷ Public methods2853.85%
▷ Protected methods2446.15%
▷ 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin