84% bp-default-data

Code Review | BuddyPress Default Data

WordPress plugin BuddyPress Default Data scored84%from 54 tests.

About plugin

  • Plugin page: bp-default-data
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5
  • WordPress version: 6.3.1
  • First release: Aug 5, 2011
  • Latest release: Sep 25, 2020
  • Number of updates: 49
  • Update frequency: every 68.2 days
  • Top authors: slaFFik (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active /66,876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.76ms] Passed 4 tests

A check of server-side resources used by BuddyPress Default Data
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1147.77 ▲3.36
Dashboard /wp-admin3.41 ▲0.0755.25 ▼8.89
Posts /wp-admin/edit.php3.53 ▲0.1751.22 ▲0.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1199.52 ▼5.68
Media Library /wp-admin/upload.php3.34 ▲0.1141.74 ▲5.92

Server storage [IO: ▲0.12MB] [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: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Default Data
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.121.69 ▼0.4042.57 ▲1.96
Dashboard /wp-admin2,192 ▲125.63 ▼0.0287.12 ▼4.3239.77 ▼1.29
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0239.84 ▲2.2333.57 ▼3.33
Add New Post /wp-admin/post-new.php1,535 ▲718.13 ▼4.88675.88 ▲18.5777.11 ▲31.65
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.0996.95 ▼13.6745.03 ▼0.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-default-data/vendor/bemailr/wp-requirements/wpr-loader.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
10 plugin tags: buddypress, groups, demo data, forums, friends...

bp-default-data/bp-default-data.php Passed 13 tests

The entry point to "BuddyPress Default Data" version 1.3.1 is a PHP file that has certain tags in its header comment area
109 characters long description:
Create lots of users, groups, activity items, messages, profile data - useful for BuddyPress testing purpose.

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
There were no executable files found in this plugin2,440 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP184056422,394
JSON20046

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity35.50
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods45
▷ Static methods48.89%
▷ Public methods2964.44%
▷ Protected methods1533.33%
▷ Private methods12.22%
Functions29
▷ Named functions2896.55%
▷ Anonymous functions13.45%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin