90% buddyfence

Code Review | Buddyfence

WordPress plugin Buddyfence scored90%from 54 tests.

About plugin

  • Plugin page: buddyfence
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 30, 2017
  • Latest release: May 23, 2022
  • Number of updates: 46
  • Update frequency: every 38.2 days
  • Top authors: jcrr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,838 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.32ms] Passed 4 tests

Analyzing server-side resources used by Buddyfence
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.59 ▲4.67
Dashboard /wp-admin3.31 ▲0.0151.10 ▼2.37
Posts /wp-admin/edit.php3.36 ▲0.0147.90 ▼5.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.78 ▼7.15
Media Library /wp-admin/upload.php3.24 ▲0.0140.87 ▲2.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Buddyfence
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.36 ▲0.012.31 ▲0.7242.59 ▲0.40
Dashboard /wp-admin2,195 ▲175.62 ▲0.05102.55 ▼1.3442.26 ▼5.02
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0339.58 ▼0.9138.76 ▲1.64
Add New Post /wp-admin/post-new.php1,534 ▼323.14 ▲4.88654.49 ▲17.1756.15 ▲0.27
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.0799.18 ▼0.6143.03 ▼2.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: security, members, redirect, buddypress, private

buddyfence/buddyfence.php Passed 13 tests

The main PHP file in "Buddyfence" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
This plugin allows you to restrict not logged-in users from accessing BuddyPress pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected287 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP65211209
PO File1265878

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.68
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%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
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 are no PNG files in this plugin