83% wp-common-security-checklist

Code Review | WP Common security Checklist

WordPress plugin WP Common security Checklist scored 83% from 54 tests.

About plugin

  • Plugin page: wp-common-securit...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8.2
  • WordPress version: 5.8.1
  • First release: Feb 28, 2017
  • Latest release: Mar 12, 2017
  • Number of updates: 29
  • Update frequency: every 7.9 days
  • Top authors: luisfredgs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 2,776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.54MB] [CPU: ▼166.92ms] Passed 4 tests

An overview of server-side resources used by WP Common security Checklist
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1547.75 ▲14.21
Dashboard /wp-admin3.10 ▲0.0533.22 ▼23.19
Posts /wp-admin/edit.php3.11 ▼0.0032.53 ▼15.36
Add New Post /wp-admin/post-new.php3.11 ▼2.3333.20 ▼627.36
Media Library /wp-admin/upload.php3.11 ▲0.1030.39 ▼1.75
WP Common security Checklist /wp-admin/options-general.php?page=csc_plugin_options3.1137.73

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP Common security Checklist
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲11716.05 ▲0.108.12 ▼1.1150.05 ▼3.64
Dashboard /wp-admin2,964 ▲336.01 ▲0.02141.07 ▼3.47110.81 ▼5.94
Posts /wp-admin/edit.php2,763 ▲242.75 ▲0.0368.23 ▼2.5390.90 ▼4.96
Add New Post /wp-admin/post-new.php1,525 ▲2717.82 ▼0.98369.38 ▼17.80105.95 ▼7.90
Media Library /wp-admin/upload.php1,825 ▲35.06 ▲0.04150.55 ▼3.86122.88 ▼12.76
WP Common security Checklist /wp-admin/options-general.php?page=csc_plugin_options1,4932.7372.47143.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-common-security-checklist/lib/common-security-checklist-ssl.php+53
    Undefined variable: output

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > Notice in wp-content/plugins/wp-common-security-checklist/lib/common-security-checklist-ssl.php+53
    Undefined variable: output
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > Notice in wp-content/plugins/wp-common-security-checklist/admin/common-security-checklist-admin-options.php+346
    Undefined index: remove_meta_generator_tag
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > Notice in wp-content/plugins/wp-common-security-checklist/admin/common-security-checklist-admin-options.php+384
    Undefined index: hide_login_url
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > Notice in wp-content/plugins/wp-common-security-checklist/admin/common-security-checklist-admin-options.php+363
    Undefined index: disable_theme_editor
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > Notice in wp-content/plugins/wp-common-security-checklist/admin/common-security-checklist-admin-options.php+445
    Undefined index: protect_sensitive_files
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > Notice in wp-content/plugins/wp-common-security-checklist/admin/common-security-checklist-admin-options.php+463
    Undefined index: disable_php_execution_directories
    • > GET request to /wp-admin/options-general.php?page=csc_plugin_options
    • > Notice in wp-content/plugins/wp-common-security-checklist/admin/common-security-checklist-admin-options.php+481
    Undefined index: enable_comment_captcha

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

wp-common-security-checklist/common-security-checklist.php 85% from 13 tests

The principal PHP file in "WP Common security Checklist" v. 1.0.8 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-common-security-checklist.php" instead of "common-security-checklist.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin4,317 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP9367601,061
CSS32813365
PO File158351205
JavaScript27815

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.89
▷ Minimum class complexity6.00
▷ Maximum class complexity28.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods72
▷ Static methods2636.11%
▷ Public methods6894.44%
▷ Protected methods11.39%
▷ Private methods34.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/logo.png9.33KB4.45KB▼ 52.28%