83% lock-my-bp

Code Review | Wbcom Designs - Private Community for BuddyPress

WordPress plugin Wbcom Designs - Private Community for BuddyPress scored83%from 54 tests.

About plugin

  • Plugin page: lock-my-bp
  • Plugin version: 1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2017
  • Latest release: Feb 23, 2023
  • Number of updates: 26
  • Update frequency: every 80.1 days
  • Top authors: wbcomdesigns (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

700+ active /19,897 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Wbcom Designs - Private Community for BuddyPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.0045.15 ▼0.89
Dashboard /wp-admin3.57 ▼0.0749.03 ▼25.20
Posts /wp-admin/edit.php3.68 ▲0.0047.57 ▼5.05
Add New Post /wp-admin/post-new.php6.15 ▲0.0085.83 ▼16.65
Media Library /wp-admin/upload.php3.49 ▲0.0037.37 ▲0.43

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wbcom Designs - Private Community for BuddyPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.37 ▲0.022.14 ▲0.2839.78 ▼6.69
Dashboard /wp-admin2,198 ▲185.64 ▼0.0585.31 ▼10.7941.92 ▼3.73
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0036.01 ▼0.0334.64 ▼2.47
Add New Post /wp-admin/post-new.php1,538 ▼723.18 ▼0.21673.52 ▲10.7055.20 ▼7.24
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0297.40 ▼6.9242.39 ▼2.53

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

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

Smoke tests 75% from 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/lock-my-bp/admin/wbcom/templates/wbcom-license-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/lock-my-bp/admin/wbcom/templates/wbcom-support-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lock-my-bp/admin/class-bp-lock-feedback.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/lock-my-bp/admin/wbcom/templates/wbcom-plugins-page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #4 (This screenshot shows the pages List options setting to screenshot-4.(png|jpg|jpeg|gif).), #5 (This screenshot shows the locked pages setting layout to screenshot-5.(png|jpg|jpeg|gif).)
You can look at the official readme.txt

lock-my-bp/bp-lock.php 77% from 13 tests

The primary PHP file in "Wbcom Designs - Private Community for BuddyPress" version 1.9.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("lock-my-bp.php" instead of "bp-lock.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin16,511 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JSON2009,149
SVG1002,671
PHP253361,0242,393
CSS5304741,955
JavaScript51917335
XML1008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.90
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods68
▷ Static methods22.94%
▷ Public methods6189.71%
▷ Protected methods00.00%
▷ Private methods710.29%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.38MB with 0.22MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/wbcom/assets/imgs/logowbcom.png10.12KB3.87KB▼ 61.72%
admin/wbcom/assets/imgs/wbcom-offer-notice.png67.64KB32.40KB▼ 52.11%
admin/wbcom/assets/imgs/bp_lock.png5.95KB3.18KB▼ 46.53%
screenshot-5.png301.64KB76.65KB▼ 74.59%