10% cellarweb-privacy-and-security-options

Code Review | CellarWeb Privacy and Security Options

WordPress plugin CellarWeb Privacy and Security Options scored 10% from 54 tests.

About plugin

  • Plugin page: cellarweb-privacy...
  • Plugin version: 2.08
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6+
  • WordPress version: 5.8.1
  • First release: Jan 2, 2020
  • Latest release: Jul 24, 2021
  • Number of updates: 15
  • Update frequency: every 37.9 days
  • Top authors: rhellewell@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 493 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+885
    Undefined index: CWPS_disable_xmlrpc

Server metrics [RAM: ▼1.48MB] [CPU: ▼189.74ms] Passed 4 tests

A check of server-side resources used by CellarWeb Privacy and Security Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼0.5715.17 ▼9.20
Dashboard /wp-admin2.17 ▼0.899.33 ▼35.99
Posts /wp-admin/edit.php2.17 ▼0.946.99 ▼43.90
Add New Post /wp-admin/post-new.php2.17 ▼3.2610.45 ▼645.61
Media Library /wp-admin/upload.php2.17 ▼0.849.62 ▼33.45
CellarWeb Privacy and Security Options /wp-admin/options-general.php?page=cllearweb_privacy_and_security2.1710.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for CellarWeb Privacy and Security Options
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,682 ▲8615.84 ▲0.268.59 ▲1.4755.07 ▲7.99
Dashboard /wp-admin2,966 ▲355.86 ▼0.06145.57 ▼12.25107.51 ▼24.41
Posts /wp-admin/edit.php2,738 ▼12.68 ▼0.0168.71 ▲3.0182.21 ▼18.41
Add New Post /wp-admin/post-new.php1,595 ▼8818.74 ▲0.02393.38 ▲10.49116.50 ▼7.37
Media Library /wp-admin/upload.php1,806 ▼15.04 ▲0.02156.03 ▼16.28122.37 ▼9.69
CellarWeb Privacy and Security Options /wp-admin/options-general.php?page=cllearweb_privacy_and_security1,8242.1062.3882.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+885
    Undefined index: CWPS_disable_xmlrpc

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+885
    Undefined index: CWPS_disable_xmlrpc
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1036
    Undefined index: CWPS_blog_favicon
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+922
    Undefined index: CWPS_check_user_name_admin
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+941
    Undefined index: CWPS_change_howdy
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+971
    Undefined index: CWPS_remove_wp_logo
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+995
    Undefined index: CWPS_add_copyright_footer
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1019
    Undefined index: CWPS_current_year
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1029
    Undefined index: CWPS_shortcodes_in_widgets
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1048
    Undefined index: CWPS_max_upload_size
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1058
    Undefined index: CWPS_max_post_size
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1069
    Undefined index: CWPS_max_execution_time
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1125
    Undefined index: CWPS_social_sharing_buttons
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1253
    Undefined index: CWPS_remove_wp_version
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1266
    Undefined index: CWPS_disable_editor
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1276
    Undefined index: CWPS_disable_error_reporting
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1474
    Undefined index: CWPS_generic_failed_login_message
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1500
    Undefined index: CWPS_custom_login_page
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1622
    Undefined index: CWPS_multisite_redirect_inactive_site
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1649
    Undefined index: CWPS_disable_remember_me
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1662
    Undefined index: CWPS_loginout_menu_bar
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+1679
    Undefined index: CWPS_home_after_loginout
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+844
    Undefined variable: bcsb_version_number
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cllearweb_privacy_and_security
    • > Notice in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php+671
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cellarweb-privacy-and-security-options/css/custom_login_page.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cellarweb-privacy-and-security-options/functions/limit_login_attempts.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/cellarweb-privacy-and-security-options/functions/force_login_email_only.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_stylesheet_directory_uri() in wp-content/plugins/cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Screenshots: Screenshot #1 (There is no screenshot. But there could be.) image required
You can take inspiration from this readme.txt

cellarweb-privacy-and-security-options/cellarweb-privacy-and-security.php 92% from 13 tests

The main PHP file in "CellarWeb Privacy and Security Options" ver. 2.08 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cellarweb-privacy-and-security-options.php" instead of "cellarweb-privacy-and-security.php")

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
Everything looks great! No dangerous files found in this plugin1,436 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP43194271,199
CSS3206207
XML40022
SVG1008

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions71
▷ Named functions6895.77%
▷ Anonymous functions34.23%
Constants2
▷ Global constants2100.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
8 PNG files occupy 0.39MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/icons8-high-importance-48.png0.95KB0.64KB▼ 32.65%
css/login/logo-signin.png69.54KB4.71KB▼ 93.22%
assets/icon-128x128.png78.51KB5.61KB▼ 92.85%
css/soda-cup-straw.png121.76KB58.15KB▼ 52.24%
css/icons8-lock-30.png0.41KB0.35KB▼ 14.80%