63% lifterlms

Code Review | LifterLMS - WordPress LMS Plugin for eLearning

WordPress plugin LifterLMS - WordPress LMS Plugin for eLearning scored63%from 54 tests.

About plugin

  • Plugin page: lifterlms
  • Plugin version: 7.5.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: Nov 6, 2023
  • Number of updates: 639
  • Update frequency: every 4.4 days
  • Top authors: thomasplevy (94.84%)strangerstudios (5.32%)

Code review

54 tests

User reviews

322 reviews

Install metrics

10,000+ active /1,284,748 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲10.40MB] [CPU: ▲101.34ms] 50% from 4 tests

This is a short check of server-side resources used by LifterLMS - WordPress LMS Plugin for eLearning
Please have a look at the following items
  • RAM: You should keep total memory usage under 10MB (currently 13.49MB on /wp-admin/edit.php?post_type=llms_engagement)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 10.40MB on /wp-admin/edit.php?post_type=llms_engagement)
PageMemory (MB)CPU Time (ms)
Home /11.69 ▲8.23120.74 ▲72.46
Dashboard /wp-admin16.45 ▲13.11213.66 ▲147.88
Posts /wp-admin/edit.php13.54 ▲10.18149.98 ▲104.25
Add New Post /wp-admin/post-new.php19.17 ▲13.29204.51 ▲112.56
Media Library /wp-admin/upload.php13.31 ▲10.08148.10 ▲116.10
Settings /wp-admin/admin.php?page=llms-settings13.85128.86
Awarded Certificates /wp-admin/edit.php?post_type=llms_my_certificate13.52135.33
Scheduled Actions /wp-admin/tools.php?page=action-scheduler13.47122.17
Forms /wp-admin/edit.php?post_type=llms_form13.60158.99
Awarded Achievements /wp-admin/edit.php?post_type=llms_my_achievement13.49119.82
Lessons /wp-admin/edit.php?post_type=lesson13.49118.03
Orders /wp-admin/edit.php?post_type=llms_order13.49118.41
Categories /wp-admin/edit-tags.php?taxonomy=membership_cat&post_type=llms_membership13.33110.80
Courses /wp-admin/edit.php?post_type=course13.49117.63
Engagements /wp-admin/edit.php?post_type=llms_engagement13.49122.38

Server storage [IO: ▲17.91MB] [DB: ▲1.05MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,408 new files
Database: 15 new tables, 62 new options
New tables
wp_lifterlms_events
wp_actionscheduler_groups
wp_actionscheduler_claims
wp_lifterlms_notifications
wp_lifterlms_product_to_voucher
wp_lifterlms_sessions
wp_actionscheduler_logs
wp_actionscheduler_actions
wp_lifterlms_api_keys
wp_lifterlms_quiz_attempts
...
New WordPress options
lifterlms_country
llms_forms_username_locations
lifterlms_myaccount_redeem_vouchers_endpoint
lifterlms_decimal_separator
lifterlms_myaccount_orders_endpoint
llms_grant_site_access
widget_theysaidso_widget
lifterlms_myaccount_achievements_endpoint
llms_site_url
lifterlms_memberships_ordering
...

Browser metrics Passed 4 tests

An overview of browser requirements for LifterLMS - WordPress LMS Plugin for eLearning
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,645 ▲88318.89 ▲4.6115.30 ▲13.5833.49 ▼11.54
Dashboard /wp-admin2,863 ▲6868.96 ▲3.41167.04 ▲65.8350.59 ▲7.70
Posts /wp-admin/edit.php2,591 ▲4913.96 ▲1.9495.06 ▲58.6834.85 ▼0.71
Add New Post /wp-admin/post-new.php1,898 ▲37219.32 ▼3.84938.72 ▲215.3843.74 ▼15.01
Media Library /wp-admin/upload.php1,701 ▲3044.22 ▼0.05100.84 ▼9.8545.59 ▼3.07
Settings /wp-admin/admin.php?page=llms-settings1,6053.8761.04105.44
Awarded Certificates /wp-admin/edit.php?post_type=llms_my_certificate1,81112.17218.32139.79
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,5531.7930.0729.22
Forms /wp-admin/edit.php?post_type=llms_form2,2743.9256.0366.67
Awarded Achievements /wp-admin/edit.php?post_type=llms_my_achievement1,6894.0567.5085.01
Lessons /wp-admin/edit.php?post_type=lesson1,7073.8368.4983.60
Orders /wp-admin/edit.php?post_type=llms_order1,6503.5558.6782.90
Categories /wp-admin/edit-tags.php?taxonomy=membership_cat&post_type=llms_membership1,7643.8250.7033.75
Courses /wp-admin/edit.php?post_type=course1,7003.8753.1485.77
Engagements /wp-admin/edit.php?post_type=llms_engagement1,6143.8162.2187.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/lifterlms/includes/admin/llms.functions.admin.php+154
    Uncaught Error: Class 'LLMS_Dot_Com_API' not found in wp-content/plugins/lifterlms/includes/admin/llms.functions.admin.php:154
    Stack trace:
    #0 wp-content/plugins/lifterlms/libraries/lifterlms-helper/includes/class-llms-helper-upgrader.php(259): llms_get_add_ons()
    #1 wp-includes/class-wp-hook.php(312): LLMS_Helper_Upgrader->pre_set_site_transient_update_things()
    #2 wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #3 wp-includes/option.php(2053): apply_filters()
    #4 wp-admin/includes/plugin.php(1031): set_site_transient()
  • Zombie tables detected upon uninstall: 15 tables
    • wp_lifterlms_quiz_attempts
    • wp_lifterlms_sessions
    • wp_lifterlms_notifications
    • wp_actionscheduler_logs
    • wp_lifterlms_events_open_sessions
    • wp_lifterlms_api_keys
    • wp_lifterlms_webhooks
    • wp_actionscheduler_groups
    • wp_actionscheduler_actions
    • wp_lifterlms_user_postmeta
    • ...
  • Zombie WordPress options were found after uninstall: 64 options
    • lifterlms_current_version
    • llms_review
    • lifterlms_myaccount_achievements_endpoint
    • lifterlms_prevent_concurrent_logins
    • llms_rest_version
    • lifterlms_prevent_concurrent_logins_roles
    • lifterlms_myaccount_courses_in_progress_sorting
    • action_scheduler_hybrid_store_demarkation
    • llms_admin_notices
    • action_scheduler_migration_status
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 63× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_NullAction.php:6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Action_Scheduler\\Migration\\LogMigrator' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/migration/DryRun_LogMigrator.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Exception' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/ActionScheduler_InvalidActionException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_type_object() in wp-content/plugins/lifterlms/includes/admin/views/builder/section.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_DBStore' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/lifterlms/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #10, #11, #12, #13, #14 in lifterlms/assets to your readme.txt
The official readme.txt is a good inspiration

lifterlms/lifterlms.php Passed 13 tests

The primary PHP file in "LifterLMS - WordPress LMS Plugin for eLearning" version 7.5.0 is used by WordPress to initiate all plugin functionality
107 characters long description:
Complete e-learning platform to sell online courses, protect lessons, offer memberships, and quiz students.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected160,635 lines of code in 1,164 files:
LanguageFilesBlank linesComment linesLines of code
PHP90528,12271,41587,630
JavaScript17411,16513,13736,045
CSS513,61356832,684
SVG2002,679
JSON21001,112
Markdown33110477
HTML80328

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.00
▷ Minimum class complexity1.00
▷ Maximum class complexity164.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces12
Interfaces7
Traits17
Classes521
▷ Abstract classes6011.52%
▷ Concrete classes46188.48%
▷ Final classes40.87%
Methods4,555
▷ Static methods63313.90%
▷ Public methods2,92864.28%
▷ Protected methods1,08723.86%
▷ Private methods54011.86%
Functions560
▷ Named functions49888.93%
▷ Anonymous functions6211.07%
Constants125
▷ Global constants3528.00%
▷ Class constants9072.00%
▷ Public constants7178.89%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
81 PNG files occupy 1.96MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/addons/Simply-Schedule-Appointments-LifterLMS.png39.28KB40.29KB0.00%
assets/images/notifications/icon-positive.png5.98KB3.17KB▼ 47.07%
assets/images/addons/Presto-Player.png26.44KB28.36KB0.00%
assets/images/addons/WP-Fusion.png25.11KB26.11KB0.00%
assets/vendor/jquery-ui-flick/images/ui-icons_454545_256x240.png6.81KB4.20KB▼ 38.28%