79% master-post-password

Code Review | Master Post Password

WordPress plugin Master Post Password scored79%from 54 tests.

About plugin

  • Plugin page: master-post-password
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2013
  • Latest release: Sep 3, 2023
  • Number of updates: 16
  • Update frequency: every 223.0 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /5,126 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.02MB] [CPU: ▼6.00ms] Passed 4 tests

This is a short check of server-side resources used by Master Post Password
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.89 ▼7.27
Dashboard /wp-admin3.33 ▲0.0345.59 ▼9.52
Posts /wp-admin/edit.php3.38 ▲0.0249.50 ▼3.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.02 ▼4.06
Media Library /wp-admin/upload.php3.25 ▲0.0238.71 ▲3.31

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Master Post Password
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.071.61 ▼0.1143.62 ▲1.59
Dashboard /wp-admin2,192 ▲125.52 ▼0.2082.79 ▼7.7537.84 ▼4.50
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0639.41 ▼4.3037.48 ▲0.18
Add New Post /wp-admin/post-new.php1,526 ▼323.34 ▲0.16635.07 ▼46.9559.52 ▲7.24
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0299.67 ▼8.0745.95 ▲0.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/master-post-password/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/master-post-password/tests/phpunit/bootstrap.php on line 29
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/master-post-password/tests/phpunit/bootstrap.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: password, post, privacy, post password, passworded...

master-post-password/master-post-password.php Passed 13 tests

"Master Post Password" version 1.3.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
125 characters long description:
Define a master post password that works for all passworded posts, while permitting the original post passwords to also work.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin473 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4135165288
Markdown3350150
Bourne Shell16221
XML10014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.34
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods3188.57%
▷ Protected methods25.71%
▷ Private methods25.71%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin