99% advanced-post-password

Code Review | Advanced Post Password

WordPress plugin Advanced Post Password scored 99% from 54 tests.

About plugin

  • Plugin page: advanced-post-pas...
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.8.1
  • First release: Jan 27, 2022
  • Latest release: Jan 27, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: deambulando (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 55 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼172.78ms] Passed 4 tests

Server-side resources used by Advanced Post Password
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0125.24 ▲1.14
Dashboard /wp-admin3.09 ▲0.0334.75 ▼8.71
Posts /wp-admin/edit.php3.15 ▲0.0433.38 ▼4.04
Add New Post /wp-admin/post-new.php5.45 ▲0.0171.93 ▼679.52
Media Library /wp-admin/upload.php3.04 ▲0.0326.81 ▲1.76
Post Password /wp-admin/options-general.php?page=advanced-post-password-settings-page3.0324.96

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Post Password
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,672 ▲4615.89 ▲0.285.07 ▼0.3676.05 ▼0.89
Dashboard /wp-admin2,935 ▲366.10 ▼0.03125.10 ▼6.12177.24 ▲7.56
Posts /wp-admin/edit.php2,745 ▲53.24 ▲0.0261.82 ▼2.27134.96 ▼12.14
Add New Post /wp-admin/post-new.php3,810 ▲6718.36 ▼0.70441.08 ▼0.88155.75 ▼10.69
Media Library /wp-admin/upload.php1,757 ▲55.47 ▼0.10138.94 ▼12.13191.27 ▼1.35
Post Password /wp-admin/options-general.php?page=advanced-post-password-settings-page1,1042.4151.57111.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found


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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Post Password settings)
The official readme.txt is a good inspiration

advanced-post-password/post-password.php 92% from 13 tests

The main PHP file in "Advanced Post Password" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-post-password.php" instead of "post-password.php")

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
There were no executable files found in this plugin166 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File1111240

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected