73% password-protected

Code Review | Password Protected - Ultimate Plugin to Password Protect Your WordPress Content with Ease

WordPress plugin Password Protected - Ultimate Plugin to Password Protect Your WordPress Content with Ease scored73%from 54 tests.

About plugin

  • Plugin page: password-protected
  • Plugin version: 2.6.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2012
  • Latest release: Nov 20, 2023
  • Number of updates: 144
  • Update frequency: every 29.9 days
  • Top authors: husobj (67.36%)wpexpertsio (33.33%)

Code review

54 tests

User reviews

108 reviews

Install metrics

400,000+ active /4,084,028 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.60MB] [CPU: ▲3.34ms] Passed 4 tests

A check of server-side resources used by Password Protected - Ultimate Plugin to Password Protect Your WordPress Content with Ease
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6243.71 ▲6.65
Dashboard /wp-admin3.98 ▲0.6453.48 ▼3.32
Posts /wp-admin/edit.php4.04 ▲0.6849.04 ▲5.00
Add New Post /wp-admin/post-new.php6.50 ▲0.6295.21 ▲5.02
Media Library /wp-admin/upload.php3.75 ▲0.5240.56 ▲7.86
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.1038.04
Password Protected /wp-admin/options-general.php?page=password-protected3.9842.83

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 276 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
fs_active_plugins
password_protected_version
fs_debug_mode
fs_accounts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Password Protected - Ultimate Plugin to Password Protect Your WordPress Content with Ease
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲6114.72 ▲0.391.64 ▼0.3333.50 ▼6.95
Dashboard /wp-admin2,244 ▲645.54 ▼0.1396.51 ▼0.7944.68 ▲2.39
Posts /wp-admin/edit.php2,147 ▲472.03 ▲0.0440.79 ▲0.1636.31 ▲0.07
Add New Post /wp-admin/post-new.php1,552 ▲2622.71 ▼0.68591.97 ▼10.8650.00 ▼19.10
Media Library /wp-admin/upload.php1,452 ▲524.24 ▲0.0797.99 ▲2.2444.77 ▲2.62
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1011.6726.5129.55
Password Protected /wp-admin/options-general.php?page=password-protected1,0171.7226.5556.78

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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/password-protected/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • password_protected_version
    • fs_accounts
    • fs_debug_mode
    • can_compress_scripts
    • fs_active_plugins
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/password-protected/password-protected.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nocache_headers() in wp-content/plugins/password-protected/theme/password-protected-login.php:42

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

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: You can look at the official readme.txt

password-protected/password-protected.php 92% from 13 tests

The main file in "Password Protected - Ultimate Plugin to Password Protect Your WordPress Content with Ease" v. 2.6.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 212 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin40,774 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258,51617,93534,641
PO File481,6511,8655,242
Markdown32150555
JavaScript44363233
CSS1520101
Bourne Shell1122

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity88.09
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods1,371
▷ Static methods20715.10%
▷ Public methods97070.75%
▷ Protected methods171.24%
▷ Private methods38428.01%
Functions106
▷ Named functions106100.00%
▷ Anonymous functions00.00%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.29MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/icon-128x128.png1.30KB0.43KB▼ 66.49%
assets/icon-256x256.png2.68KB0.96KB▼ 64.29%
freemius/assets/img/password-protected-free.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%