83% bulk-password-protect-post-types

Code Review | Bulk Password Protect Post Types

WordPress plugin Bulk Password Protect Post Types scored 83% from 54 tests.

About plugin

  • Plugin page: bulk-password-pro...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jan 16, 2017
  • Latest release: Jan 16, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Mckilem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,359 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.03MB] [CPU: ▼1.53ms] Passed 4 tests

A check of server-side resources used by Bulk Password Protect Post Types
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.95 ▲5.22
Dashboard /wp-admin3.33 ▲0.0347.80 ▲1.59
Posts /wp-admin/edit.php3.38 ▲0.0348.95 ▲2.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.72 ▼10.59
Media Library /wp-admin/upload.php3.26 ▲0.0334.24 ▼0.03
Bulk Password Protect /wp-admin/options-general.php?page=password_protect_all_posts3.2028.83

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bulk Password Protect Post Types
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.57 ▼1.011.71 ▼0.0241.92 ▼2.55
Dashboard /wp-admin2,210 ▲214.83 ▼0.08107.30 ▼14.6939.31 ▼0.93
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0340.27 ▲0.0535.16 ▼0.18
Add New Post /wp-admin/post-new.php1,545 ▲1218.40 ▼4.72638.10 ▼28.1061.21 ▲8.29
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.21100.82 ▼1.7544.45 ▲1.86
Bulk Password Protect /wp-admin/options-general.php?page=password_protect_all_posts8602.0323.3934.18

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=password_protect_all_posts
    • > Warning in wp-content/plugins/bulk-password-protect-post-types/bulk-password.php+100
    Use of undefined constant pass_protect_all_select_types - assumed 'pass_protect_all_select_types' (this will throw an Error in a future version of PHP)
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=password_protect_all_posts
    • > Notice in wp-content/plugins/bulk-password-protect-post-types/bulk-password.php+108
    Undefined variable: checked

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
  • Screenshots: Screenshot #1 (The settings page.) image required
You can look at the official readme.txt

bulk-password-protect-post-types/bulk-password.php 85% from 13 tests

The main PHP file in "Bulk Password Protect Post Types" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bulk-password-protect-post-types.php" instead of "bulk-password.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected112 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24522112

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected