89% advanced-post-password

Code Review | Advanced Post Password

WordPress plugin Advanced Post Password scored89%from 54 tests.

About plugin

  • Plugin page: advanced-post-pas...
  • Plugin version: 1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 27, 2022
  • Latest release: Aug 19, 2023
  • Number of updates: 12
  • Update frequency: every 47.4 days
  • Top authors: deambulando (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /779 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.15ms] Passed 4 tests

An overview of server-side resources used by Advanced Post Password
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.02 ▼4.34
Dashboard /wp-admin3.38 ▲0.0747.27 ▼9.11
Posts /wp-admin/edit.php3.43 ▲0.0748.69 ▲0.50
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.74 ▼11.66
Media Library /wp-admin/upload.php3.30 ▲0.0736.78 ▲2.69
Post Password /wp-admin/options-general.php?page=advanced-post-password-settings-page3.2730.98

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Post Password
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.55 ▼0.671.78 ▼0.1542.49 ▼1.19
Dashboard /wp-admin2,207 ▲195.80 ▲0.7395.60 ▼18.4840.37 ▼5.43
Posts /wp-admin/edit.php2,096 ▲72.00 ▲0.0238.90 ▲3.0735.26 ▼0.67
Add New Post /wp-admin/post-new.php1,536 ▲322.92 ▼0.21636.33 ▼58.5151.85 ▼9.68
Media Library /wp-admin/upload.php1,392 ▲74.28 ▲0.06102.62 ▲1.5643.83 ▲1.06
Post Password /wp-admin/options-general.php?page=advanced-post-password-settings-page8182.0324.6022.75

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Post Password settings)
You can look at the official readme.txt

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

The main PHP file in "Advanced Post Password" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin166 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25578126
PO File1111240

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin