90% bp-member-type-generator

Code Review | BuddyPress Member Type Generator

WordPress plugin BuddyPress Member Type Generator scored90%from 54 tests.

About plugin

  • Plugin page: bp-member-type-ge...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2015
  • Latest release: Jan 7, 2020
  • Number of updates: 14
  • Update frequency: every 116.9 days
  • Top authors: sbrajesh (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /27,349 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.00MB] [CPU: ▼5.04ms] Passed 4 tests

A check of server-side resources used by BuddyPress Member Type Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.23 ▼5.18
Dashboard /wp-admin3.32 ▼0.0356.64 ▼3.32
Posts /wp-admin/edit.php3.37 ▲0.0145.45 ▼4.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.28 ▼7.58
Media Library /wp-admin/upload.php3.24 ▲0.0136.49 ▲1.15

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Member Type Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.31 ▼0.051.87 ▼0.0444.55 ▼1.60
Dashboard /wp-admin2,192 ▲155.53 ▼0.1686.03 ▼10.3739.29 ▼1.19
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0537.48 ▼3.3436.53 ▼1.61
Add New Post /wp-admin/post-new.php1,545 ▼1123.08 ▲4.96672.28 ▲43.1357.00 ▲4.62
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.02104.03 ▲4.3547.15 ▲3.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
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 just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed: You can take inspiration from this readme.txt

bp-member-type-generator/bp-member-type-generator.php Passed 13 tests

The entry point to "BuddyPress Member Type Generator" version 1.0.6 is a PHP file that has certain tags in its header comment area
140 characters long description:
Allows site admins to create/manage Member types from WordPress dashboard. Also, includes functionality to bulk assign member type to users.

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
Everything looks great! No dangerous files found in this plugin561 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6238302561

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.60
▷ Minimum class complexity6.00
▷ Maximum class complexity22.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods38
▷ Static methods513.16%
▷ Public methods2976.32%
▷ Protected methods00.00%
▷ Private methods923.68%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin