66% baw-multiple-pass-for-protected-pages

Code Review | Multiple Passwords for Protected Pages

WordPress plugin Multiple Passwords for Protected Pages scored66%from 54 tests.

About plugin

  • Plugin page: baw-multiple-pass...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1+
  • WordPress version: 6.3.1
  • First release: Aug 5, 2012
  • Latest release: Oct 10, 2013
  • Number of updates: 20
  • Update frequency: every 21.6 days
  • Top authors: juliobox (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

500+ active /18,094 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.28ms] Passed 4 tests

Server-side resources used by Multiple Passwords for Protected Pages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0352.53 ▲9.57
Dashboard /wp-admin3.36 ▲0.0649.58 ▼4.96
Posts /wp-admin/edit.php3.42 ▲0.0554.68 ▲2.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0584.73 ▼7.20
Media Library /wp-admin/upload.php3.29 ▲0.0539.97 ▲4.20
Multipass for Pages /wp-admin/options-general.php?page=bawmpp_settings3.2333.31

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Multiple Passwords for Protected Pages: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.17 ▼0.161.82 ▼0.0743.57 ▼5.30
Dashboard /wp-admin2,199 ▲225.58 ▼0.0687.71 ▼12.1537.59 ▼5.73
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0140.98 ▲5.3135.23 ▼2.30
Add New Post /wp-admin/post-new.php1,535 ▲923.56 ▼0.14619.81 ▼70.1251.89 ▼6.85
Media Library /wp-admin/upload.php1,398 ▼24.21 ▲0.02100.56 ▼7.7543.04 ▼5.82
Multipass for Pages /wp-admin/options-general.php?page=bawmpp_settings9382.1323.0038.69

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=bawmpp_settings
    • > Deprecated in wp-content/plugins/baw-multiple-pass-for-protected-pages/inc/backend-noajax.inc.php+47
    Function create_function() is deprecated

SRP 0% 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 fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/baw-multiple-pass-for-protected-pages/inc/about.inc.php
    • > /wp-content/plugins/baw-multiple-pass-for-protected-pages/inc/setting_fields.inc.php
    • > /wp-content/plugins/baw-multiple-pass-for-protected-pages/inc/backend-noajax.inc.php
    • > /wp-content/plugins/baw-multiple-pass-for-protected-pages/inc/frontend-noajax.inc.php
    • > /wp-content/plugins/baw-multiple-pass-for-protected-pages/inc/bothend-noajax.inc.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/baw-multiple-pass-for-protected-pages/bawmpp.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=bawmpp_settings
    • > Network (severe)
    https://dl.dropbox.com/u/45956904/plugins/bawlogo.png - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/options-general.php?page=bawmpp_settings
    • > Network (severe)
    https://dl.dropbox.com/u/45956904/plugins/paypal_big.png - Failed to load resource: the server responded with a status of 404 ()

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
Attributes that require attention:
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

baw-multiple-pass-for-protected-pages/bawmpp.php 92% from 13 tests

The entry point to "Multiple Passwords for Protected Pages" version 1.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("baw-multiple-pass-for-protected-pages.php" instead of "bawmpp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected386 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6279333
PO File1191853

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon32.png1.87KB1.54KB▼ 17.46%