62% wp-private-content-plus

Code Review | WP Private Content Plus

WordPress plugin WP Private Content Plus scored62%from 54 tests.

About plugin

  • Plugin page: wp-private-conten...
  • Plugin version: 3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2015
  • Latest release: May 7, 2023
  • Number of updates: 110
  • Update frequency: every 24.6 days
  • Top authors: nimeshrmr (100%)

Code review

54 tests

User reviews

41 reviews

Install metrics

7,000+ active /237,530 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.09MB] [CPU: ▲3.12ms] Passed 4 tests

A check of server-side resources used by WP Private Content Plus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.54 ▲1.0848.15 ▲11.55
Dashboard /wp-admin4.41 ▲1.1054.75 ▲9.59
Posts /wp-admin/edit.php4.46 ▲1.1051.70 ▼0.66
Add New Post /wp-admin/post-new.php7.06 ▲1.1791.36 ▼7.18
Media Library /wp-admin/upload.php4.33 ▲1.1046.65 ▲10.71
Site Lockdown /wp-admin/admin.php?page=wppcp-site-lockdown-settings-page4.3339.26
Addons /wp-admin/admin.php?page=wppcp-pro-addons4.2438.04
Add New /wp-admin/post-new.php?post_type=wppcp_group4.5053.09
Search Settings /wp-admin/admin.php?page=wppcp-search-settings-page4.3239.26
PRO Version /wp-admin/admin.php?page=wppcp-pro4.2436.30
User Profiles Made Easy /wp-admin/admin.php?page=wppcp-upme-settings4.3236.52
Getting Started /wp-admin/admin.php?page=wppcp-help4.2838.23
Security Settings /wp-admin/admin.php?page=wppcp-security-settings-page4.3237.81
Welcome to WP Private Content Plus /wp-admin/index.php?page=wppcp-welcome-screen4.2937.02
Private User Page /wp-admin/admin.php?page=wppcp-private-user-page4.3365.75

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 99 new files
Database: 2 new tables, 7 new options
New tables
wp_wppcp_group_users
wp_wppcp_private_page
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
wppcp_plugin_data
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Private Content Plus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18313.20 ▼1.162.20 ▲0.5742.30 ▼1.57
Dashboard /wp-admin2,302 ▲1175.04 ▼0.83116.79 ▲16.4543.17 ▲3.31
Posts /wp-admin/edit.php2,192 ▲1032.48 ▲0.4735.25 ▼5.0832.17 ▼4.74
Add New Post /wp-admin/post-new.php6,674 ▲5,13225.43 ▲7.251,033.26 ▲427.1564.28 ▲8.55
Media Library /wp-admin/upload.php1,487 ▲994.20 ▼0.03108.09 ▲6.6147.11 ▲1.03
Site Lockdown /wp-admin/admin.php?page=wppcp-site-lockdown-settings-page1,1182.5744.6825.75
Addons /wp-admin/admin.php?page=wppcp-pro-addons1,0011.9836.3430.60
Add New /wp-admin/post-new.php?post_type=wppcp_group2,3838.40182.2767.14
Search Settings /wp-admin/admin.php?page=wppcp-search-settings-page1,0962.5337.6131.80
PRO Version /wp-admin/admin.php?page=wppcp-pro9451.8428.3333.43
User Profiles Made Easy /wp-admin/admin.php?page=wppcp-upme-settings8712.0928.9723.38
Getting Started /wp-admin/admin.php?page=wppcp-help1,0111.8828.1151.46
Security Settings /wp-admin/admin.php?page=wppcp-security-settings-page9922.1227.8724.31
Welcome to WP Private Content Plus /wp-admin/index.php?page=wppcp-welcome-screen1,8039.36263.74110.73
Private User Page /wp-admin/admin.php?page=wppcp-private-user-page1,0432.3235.9133.95

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
The following items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_wppcp_private_page
    • wp_wppcp_group_users
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • wppcp_plugin_data
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wppcp-security-settings-page
    • > Notice in wp-content/plugins/wp-private-content-plus/admin/templates/menu-page-container.php+6
    Undefined variable: display

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 take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-private-content-plus/templates/social-locker/default-social-locker.php
    • > /wp-content/plugins/wp-private-content-plus/templates/addons-feed.php
  • 78× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-private-content-plus/admin/templates/security-ip-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to a member function wppcp_user_roles() on null in wp-content/plugins/wp-private-content-plus/admin/templates/upme-search.php:4
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-private-content-plus/templates/global-password-form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/wp-private-content-plus/admin/templates/mailchimp-general-settings.php:1
    • > PHP Notice
      Trying to get property 'roles_capability' of non-object in wp-content/plugins/wp-private-content-plus/admin/templates/upme-search.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-private-content-plus/templates/plugins-feed.php on line 5
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-private-content-plus/admin/templates/social-locker-general.php on line 3
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-private-content-plus/admin/templates/search-restrictions.php on line 3
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-private-content-plus/templates/woo-tabs-restriction-meta.php on line 3
    • > PHP Notice
      Trying to get property 'roles_capability' of non-object in wp-content/plugins/wp-private-content-plus/templates/post-page-restriction-meta.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (50 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-private-content-plus/wp-private-content-plus.php Passed 13 tests

"WP Private Content Plus" version 3.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Advanced private content restrictions for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected9,922 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP572,1801346,872
CSS5196211,078
PO File14105721,015
JavaScript7154143957

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.39
Average class complexity54.86
▷ Minimum class complexity2.00
▷ Maximum class complexity269.00
Average method complexity6.74
▷ Minimum method complexity1.00
▷ Maximum method complexity87.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods197
▷ Static methods10.51%
▷ Public methods19598.98%
▷ Protected methods00.00%
▷ Private methods21.02%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
23 PNG files occupy 0.28MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/file.png1.19KB1.05KB▼ 12.36%
images/edit.png0.70KB0.52KB▼ 25.00%
images/docs/settings_1.png23.20KB12.11KB▼ 47.79%
images/docs/widget.png12.14KB3.88KB▼ 68.02%
images/icon-128x128.png16.25KB6.16KB▼ 62.11%