68% behind-closed-doors

Code Review | Behind Closed Doors

WordPress plugin Behind Closed Doors scored 68% from 54 tests.

About plugin

  • Plugin page: behind-closed-doors
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2014
  • Latest release: Feb 14, 2019
  • Number of updates: 6
  • Update frequency: every 284.8 days
  • Top authors: spencersokol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,175 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼1.20MB] [CPU: ▼44.39ms] Passed 4 tests

Analyzing server-side resources used by Behind Closed Doors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7014.65 ▼25.31
Dashboard /wp-admin2.81 ▼0.4916.63 ▼33.09
Posts /wp-admin/edit.php2.81 ▼0.5417.34 ▼31.30
Add New Post /wp-admin/post-new.php2.81 ▼3.0716.94 ▼87.84
Media Library /wp-admin/upload.php2.81 ▼0.4218.06 ▼19.35
Behind Closed Doors /wp-admin/options-general.php?page=wp-behind-closed-doors2.8117.72

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Behind Closed Doors
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.52 ▲0.131.91 ▲0.0442.31 ▼10.45
Dashboard /wp-admin2,201 ▲135.83 ▼0.0798.99 ▼2.3538.39 ▼6.02
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0437.50 ▼0.6230.24 ▼1.00
Add New Post /wp-admin/post-new.php1,516 ▼2617.39 ▼0.69603.28 ▼58.7979.22 ▲3.83
Media Library /wp-admin/upload.php1,386 ▲14.22 ▲0.0199.08 ▼5.5643.04 ▼1.31
Behind Closed Doors /wp-admin/options-general.php?page=wp-behind-closed-doors8272.0324.6024.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/behind-closed-doors/classes/wp-behind-closed-doors.php+166
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-behind-closed-doors
    • > Notice in wp-content/plugins/behind-closed-doors/classes/wp-behind-closed-doors.php+375
    Trying to access array offset on value of type bool

SRP 50% 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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/behind-closed-doors/behind-closed-doors.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/behind-closed-doors/views/options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/behind-closed-doors/templates/login.php:10
    • > PHP Warning
      Use of undefined constant WP_BCD_SHORT_TITLE - assumed 'WP_BCD_SHORT_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/behind-closed-doors/views/options.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration Passed 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: privacy, security, login, maintenance, maintenance-mode

behind-closed-doors/behind-closed-doors.php Passed 13 tests

"Behind Closed Doors" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
92 characters long description:
Keeps your entire site behind a page, with or without a login form, should you desire it so.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected218 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
▷ Static methods1789.47%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin