78% wp-edit-password-protected

Code Review | Wp Edit Password Protected - Create Member/User Only Page & Design Password Protected Form

WordPress plugin Wp Edit Password Protected - Create Member/User Only Page & Design Password Protected Form scored78%from 54 tests.

About plugin

  • Plugin page: wp-edit-password-...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4
  • WordPress version: 6.3.1
  • First release: Feb 2, 2018
  • Latest release: Nov 23, 2023
  • Number of updates: 52
  • Update frequency: every 40.8 days
  • Top authors: nalam (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active /32,459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.26MB] [CPU: ▲21.53ms] Passed 4 tests

This is a short check of server-side resources used by Wp Edit Password Protected - Create Member/User Only Page & Design Password Protected Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.61 ▲4.1556.54 ▲18.99
Dashboard /wp-admin7.60 ▲4.2968.21 ▲20.76
Posts /wp-admin/edit.php7.68 ▲4.3275.30 ▲29.01
Add New Post /wp-admin/post-new.php10.16 ▲4.27111.49 ▲17.34
Media Library /wp-admin/upload.php7.60 ▲4.3765.38 ▲31.97

Server storage [IO: ▲2.84MB] [DB: ▲0.24MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 386 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
pp_new_basic_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp Edit Password Protected - Create Member/User Only Page & Design Password Protected Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲26215.18 ▲0.911.61 ▼0.3027.49 ▼10.61
Dashboard /wp-admin2,424 ▲2446.32 ▲0.65125.09 ▲27.1157.34 ▲14.32
Posts /wp-admin/edit.php2,359 ▲2593.73 ▲1.7759.55 ▲19.6449.56 ▲13.65
Add New Post /wp-admin/post-new.php1,609 ▲7323.26 ▲0.04650.38 ▼0.0936.87 ▼12.10
Media Library /wp-admin/upload.php1,489 ▲954.39 ▲0.1892.56 ▼4.8657.24 ▲15.34
WP Edit password protected options /wp-admin/wp-edit-pass.php260.410.099.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • pp_new_basic_settings
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 80× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field\\Text' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/control-generic/src/Field/URL.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-edit-password-protected/admin/wp_edit_pass_options.php:79
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Control\\Base' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/control-repeater/src/Control/Repeater.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/control-multicheck/src/Field/Multicheck.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/field-typography/src/Field/Typography.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field\\ReactColorful' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/control-color/src/Field/Color.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/module-sections/src/Section_Types/Link.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/control-base/src/Control/Base.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/wp-edit-password-protected/admin/kirki/packages/kirki-framework/util/src/Setting/Site_Option.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-edit-password-protected/admin/pagetemplater.php:167

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/wp-edit-pass.php
    • > Network (severe)
    wp-admin/wp-edit-pass.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4 in wp-edit-password-protected/assets to your readme.txt
Please take inspiration from this readme.txt

wp-edit-password-protected/wp-edit-password-protected.php Passed 13 tests

The primary PHP file in "Wp Edit Password Protected - Create Member/User Only Page & Design Password Protected Form" version 1.2.6 is used by WordPress to initiate all plugin functionality
90 characters long description:
Create member only page and change the message displayed of default wp Password Protected.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected35,136 lines of code in 316 files:
LanguageFilesBlank linesComment linesLines of code
PHP1623,61310,28413,568
JavaScript911,8882,54210,846
JSON7008,431
Markdown2931201,434
CSS225344593
SVG270110
XML161195
YAML213059

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity15.10
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces18
Interfaces0
Traits0
Classes141
▷ Abstract classes10.71%
▷ Concrete classes14099.29%
▷ Final classes107.14%
Methods704
▷ Static methods14220.17%
▷ Public methods54677.56%
▷ Protected methods10114.35%
▷ Private methods578.10%
Functions51
▷ Named functions1529.41%
▷ Anonymous functions3670.59%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.30MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/kirki/assets/images/2cr.png0.85KB0.27KB▼ 68.58%
assets/img/admin-only-page.png145.85KB37.50KB▼ 74.29%
admin/kirki/assets/images/kirki-bottom.png1.51KB1.09KB▼ 27.89%
admin/kirki/assets/images/3cr.png0.91KB0.32KB▼ 64.81%
assets/img/wpedit-pass.png155.69KB40.66KB▼ 73.88%