74% private-password-posts

Code Review | Private Password Posts

WordPress plugin Private Password Posts scored74%from 54 tests.

About plugin

  • Plugin page: private-password-...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0
  • WordPress version: 6.3.1
  • First release: Dec 13, 2016
  • Latest release: Jun 22, 2022
  • Number of updates: 5
  • Update frequency: every 402.6 days
  • Top authors: zhuyi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /938 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼39.06ms] Passed 4 tests

An overview of server-side resources used by Private Password Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.24 ▲3.38
Dashboard /wp-admin3.01 ▼0.3422.62 ▼40.17
Posts /wp-admin/edit.php3.01 ▼0.3526.79 ▼23.73
Add New Post /wp-admin/post-new.php3.01 ▼2.8826.37 ▼80.07
Media Library /wp-admin/upload.php3.01 ▼0.2227.20 ▼12.28
Private Post /wp-admin/admin.php?page=bbpronewuserapprovedsettings3.0126.58

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Private Password Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.72 ▲0.352.07 ▲0.2944.42 ▲1.96
Dashboard /wp-admin2,214 ▲405.70 ▲0.0588.19 ▼3.5442.58 ▲1.46
Posts /wp-admin/edit.php2,116 ▲161.96 ▼0.0336.15 ▼1.9934.68 ▲2.64
Add New Post /wp-admin/post-new.php1,544 ▲923.20 ▲4.83685.75 ▲43.6663.16 ▼7.38
Media Library /wp-admin/upload.php1,419 ▲164.15 ▼0.04102.84 ▼0.6845.75 ▼0.20
Private Post /wp-admin/admin.php?page=bbpronewuserapprovedsettings8421.9925.2933.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bbpronewuserapprovedsettings
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: access, hidden post, theme, password protect post, password post...

private-password-posts/private-password-posts.php 92% from 13 tests

The main PHP script in "Private Password Posts" version 1.5.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 detected113 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11826113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin