84% buddypress-learndash

Code Review | BuddyPress for LearnDash

WordPress plugin BuddyPress for LearnDash scored84%from 54 tests.

About plugin

  • Plugin page: buddypress-learndash
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2015
  • Latest release: Jun 19, 2020
  • Number of updates: 46
  • Update frequency: every 41.2 days
  • Top authors: BuddyBoss (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

4,000+ active /93,534 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.37ms] Passed 4 tests

Analyzing server-side resources used by BuddyPress for LearnDash
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.70 ▼0.09
Dashboard /wp-admin3.31 ▲0.0047.40 ▼8.13
Posts /wp-admin/edit.php3.36 ▲0.0052.28 ▼2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.91 ▼5.14
Media Library /wp-admin/upload.php3.23 ▲0.0037.45 ▼1.88

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

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

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress for LearnDash
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.63 ▲0.272.49 ▲0.8942.41 ▲1.12
Dashboard /wp-admin2,195 ▲185.64 ▼0.0593.96 ▼2.0338.99 ▼3.86
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0242.55 ▲4.1838.75 ▲2.19
Add New Post /wp-admin/post-new.php1,531 ▲523.01 ▲5.42658.40 ▲42.6364.08 ▼0.01
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.0199.82 ▼3.9543.78 ▼2.57

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

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

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 no errors were found, this is by no means an exhaustive test

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 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 locate_template() in wp-content/plugins/buddypress-learndash/templates/courses.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
Please take inspiration from this readme.txt

buddypress-learndash/buddypress-learndash.php Passed 13 tests

The main PHP file in "BuddyPress for LearnDash" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
98 characters long description:
Integrate the LearnDash LMS plugin with BuddyPress, so you can add courses to your social network.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,883 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP156389332,451
JSON2001,608
PO File3270362649
JavaScript32272162
CSS42313

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.75
▷ Minimum class complexity7.00
▷ Maximum class complexity89.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods101
▷ Static methods76.93%
▷ Public methods9695.05%
▷ Protected methods00.00%
▷ Private methods54.95%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin