84% bp-block-member-posting

Code Review | Block Member Posting for BuddyPress

WordPress plugin Block Member Posting for BuddyPress scored84%from 54 tests.

About plugin

  • Plugin page: bp-block-member-p...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 9
  • Update frequency: every 20.0 days
  • Top authors: giannis4 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /754 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by Block Member Posting for BuddyPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.41 ▼8.51
Dashboard /wp-admin3.31 ▼0.0446.26 ▼19.81
Posts /wp-admin/edit.php3.36 ▲0.0048.61 ▼5.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.22 ▼9.70
Media Library /wp-admin/upload.php3.23 ▲0.0036.81 ▲0.56

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Block Member Posting for BuddyPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.28 ▼0.835.89 ▲3.7643.14 ▼0.09
Dashboard /wp-admin2,206 ▲154.88 ▼1.02111.13 ▲5.3544.61 ▲1.33
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0539.74 ▲2.3035.60 ▲2.33
Add New Post /wp-admin/post-new.php1,533 ▲1223.40 ▲0.44637.34 ▼11.5855.00 ▲6.16
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0297.03 ▼8.9443.49 ▼1.25

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bp-block-member-posting/bp-block-member-posting.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bp-block-member-posting/templates/bp-block-members-admin-page.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
4 plugin tags: block, members, post, buddypress

bp-block-member-posting/bp-block-member-posting.php Passed 13 tests

Analyzing the main PHP file in "Block Member Posting for BuddyPress" version 1.1.1
51 characters long description:
Block a member from making new posts for BuddyPress

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
Success! There were no dangerous files found in this plugin1,052 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP82774101,035
CSS10012
JavaScript14135

PHP code Passed 2 tests

Analyzing 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.47
Average class complexity19.40
▷ Minimum class complexity9.00
▷ Maximum class complexity34.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods2972.50%
▷ Protected methods512.50%
▷ Private methods615.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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
No PNG files were detected