61% masterstudy-lms-learning-management-system

Code Review | MasterStudy LMS WordPress Plugin – for Online Courses and Education

WordPress plugin MasterStudy LMS WordPress Plugin – for Online Courses and Education scored61%from 54 tests.

About plugin

  • Plugin page: masterstudy-lms-l...
  • Plugin version: 3.1.15
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Aug 27, 2018
  • Latest release: Nov 29, 2023
  • Number of updates: 354
  • Update frequency: every 5.4 days
  • Top authors: stylemix (100%)

Code review

54 tests

User reviews

259 reviews

Install metrics

10,000+ active /834,767 total downloads

Benchmarks

Plugin footprint 63% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲9.10MB] [CPU: ▲96.08ms] 25% from 4 tests

This is a short check of server-side resources used by MasterStudy LMS WordPress Plugin – for Online Courses and Education
Please have a look at the following items
  • RAM: The total memory usage must be kept under 10MB (currently 13.46MB on /wp-admin/admin.php?page=stm-lms-go-pro)
  • CPU: You should keep total CPU usage under 500.00ms (currently 808.43ms on /wp-admin/admin.php?page=stm-lms-go-pro)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 9.10MB on /wp-admin/admin.php?page=stm-lms-go-pro)
PageMemory (MB)CPU Time (ms)
Home /9.47 ▲6.01108.04 ▲66.98
Dashboard /wp-admin13.48 ▲10.14148.15 ▲92.26
Posts /wp-admin/edit.php13.58 ▲10.22170.95 ▲121.92
Add New Post /wp-admin/post-new.php15.93 ▲10.04219.26 ▲124.91
Media Library /wp-admin/upload.php13.47 ▲10.24135.25 ▲103.14
Reviews /wp-admin/edit.php?post_type=stm-reviews13.63137.89
Settings /wp-admin/admin.php?page=stm-lms-settings13.54154.40
Upcoming Course Status /wp-admin/admin.php?page=upcoming-course-status13.46141.64
Trial Courses /wp-admin/admin.php?page=trial-courses13.46135.05
Point System /wp-admin/admin.php?page=point-system13.46136.46
Email Manager /wp-admin/admin.php?page=email-manager13.46136.21
Courses category /wp-admin/edit-tags.php?taxonomy=stm_lms_course_taxonomy18.48154.36
The Gradebook /wp-admin/admin.php?page=the-gradebook13.46139.30
Payouts /wp-admin/edit.php?post_type=stm-payout13.56136.52
Unlock PRO /wp-admin/admin.php?page=stm-lms-go-pro13.46808.43

Server storage [IO: ▲45.16MB] [DB: ▲0.05MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • Filesystem usage must be lower than 25MB (currently using 45.16MB)
Filesystem: 2,251 new files
Database: 13 new tables, 14 new options
New tables
wp_stm_lms_user_quizzes_times
wp_stm_lms_curriculum_sections
wp_stm_lms_user_answers
wp_stm_lms_user_chat
wp_stm_lms_user_lessons
wp_stm_lms_user_cart
wp_stm_lms_user_searches
wp_stm_lms_curriculum_materials
wp_stm_lms_user_searches_stats
wp_stm_lms_order_items
...
New WordPress options
stm_lms_set_woocommerce_order_items
widget_recent-posts
theysaidso_admin_options
widget_stm_lms_popular_courses
widget_theysaidso_widget
notification_enqueue
stm_lms_db_version
stm_lms_set_order_total_price
db_upgraded
stm_lms_settings
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for MasterStudy LMS WordPress Plugin – for Online Courses and Education
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,275 ▲1,53920.97 ▲6.5515.22 ▲13.4726.69 ▼17.30
Dashboard /wp-admin3,448 ▲1,26811.15 ▲5.54236.13 ▲146.47227.47 ▲184.99
Posts /wp-admin/edit.php3,220 ▲1,1207.69 ▲5.68136.97 ▲95.39192.43 ▲152.77
Add New Post /wp-admin/post-new.php2,588 ▲1,05926.37 ▲3.29683.46 ▲1.41215.54 ▲157.94
Media Library /wp-admin/upload.php2,456 ▲1,0627.92 ▲3.73155.19 ▲53.06207.34 ▲162.65
Reviews /wp-admin/edit.php?post_type=stm-reviews2,2457.68128.93216.15
Settings /wp-admin/admin.php?page=stm-lms-settings8,05817.80174.38283.97
Upcoming Course Status /wp-admin/admin.php?page=upcoming-course-status1,9627.36122.58193.70
Trial Courses /wp-admin/admin.php?page=trial-courses1,9627.45108.82161.51
Point System /wp-admin/admin.php?page=point-system1,9597.44129.53153.32
Email Manager /wp-admin/admin.php?page=email-manager1,9597.36115.61179.62
Courses category /wp-admin/edit-tags.php?taxonomy=stm_lms_course_taxonomy2,6909.11125.06112.96
The Gradebook /wp-admin/admin.php?page=the-gradebook1,9717.41111.74195.13
Payouts /wp-admin/edit.php?post_type=stm-payout2,2597.70135.54180.35
Unlock PRO /wp-admin/admin.php?page=stm-lms-go-pro2,5287.43123.77211.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 13 tables in the database
    • wp_stm_lms_order_items
    • wp_stm_lms_user_conversation
    • wp_stm_lms_user_cart
    • wp_stm_lms_user_courses
    • wp_stm_lms_user_quizzes
    • wp_stm_lms_user_chat
    • wp_stm_lms_user_searches
    • wp_stm_lms_curriculum_materials
    • wp_stm_lms_user_lessons
    • wp_stm_lms_user_answers
    • ...
  • This plugin did not uninstall successfully, leaving 14 options in the database
    • notification_enqueue
    • stm_lms_settings
    • db_upgraded
    • widget_recent-posts
    • stm_lms_db_version
    • widget_stm_lms_popular_courses
    • stm_lms_version
    • theysaidso_admin_options
    • stm_lms_set_woocommerce_order_items
    • can_compress_scripts
    • ...

Smoke tests 25% 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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 31× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/dashboard/dashboard.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/lesson/content_top_wrapper_end.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/elementor-widgets/courses/courses-grid/sorting/sorting-style-2.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/account/v1/form_builder/checkbox.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/settings/questions_v2/tpls/question_items.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/settings/order/fields/order.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/settings/custom_fields/send_email/components_js/send_email.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/elementor-widgets/courses/courses-archive/sorting/sorting-style-1.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/elementor-widgets/instructors-carousel/navigation/top.php
    • > /wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/course-player/content/quiz/metas.php
  • 1105× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function vc_map_get_attributes() in wp-content/plugins/masterstudy-lms-learning-management-system/_core/includes/visual_composer/vc_templates/stm_lms_courses_grid.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/masterstudy-lms-learning-management-system/_core/includes/elementor/widgets/courses/content/card.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/masterstudy-lms-learning-management-system/_core/lms/classes/user.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/masterstudy-lms-learning-management-system/_core/libraries/paypal/includes/classes/vender/paypal/rest-api-sdk-php/lib/PayPal/Api/Transactions.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function stm_lms_module_styles() in wp-content/plugins/masterstudy-lms-learning-management-system/_core/includes/shortcodes/partials/courses_categories/style_3.php:3
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/masterstudy-lms-learning-management-system/_core/libraries/nuxy/metaboxes/fields/hint.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/masterstudy-lms-learning-management-system/_core/libraries/paypal/includes/classes/vender/paypal/rest-api-sdk-php/lib/PayPal/Api/PatchRequest.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/masterstudy-lms-learning-management-system/_core/settings/custom_fields/send_email/fields/send_email.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/masterstudy-lms-learning-management-system/_core/stm-lms-templates/elementor-widgets/courses/courses-grid/sorting/sorting-style-2.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/masterstudy-lms-learning-management-system/_core/libraries/paypal/includes/classes/vender/paypal/rest-api-sdk-php/lib/PayPal/Api/MerchantInfo.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/edit-tags.php?taxonomy=stm_lms_course_taxonomy
    • > Rendering (warning) in unknown
    /wp-admin/edit-tags.php?taxonomy=stm_lms_course_taxonomy 402 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: learning management system, elearning, lms, education, course

masterstudy-lms-learning-management-system/masterstudy-lms-learning-management-system.php 92% from 13 tests

The main file in "MasterStudy LMS WordPress Plugin – for Online Courses and Education" v. 3.1.15 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 173 characters long)

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 plugin336,204 lines of code in 2,025 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32010,1869,30797,845
PHP1,19914,41923,59893,245
JSON140067,805
PO File1619,61633,93443,281
SVG230253916,431
CSS2331,5595312,741
XML792804,440
Markdown61040416

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.37
▷ Minimum class complexity1.00
▷ Maximum class complexity409.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces64
Interfaces10
Traits4
Classes510
▷ Abstract classes163.14%
▷ Concrete classes49496.86%
▷ Final classes7314.78%
Methods4,148
▷ Static methods71117.14%
▷ Public methods3,81591.97%
▷ Protected methods2576.20%
▷ Private methods761.83%
Functions466
▷ Named functions31166.74%
▷ Anonymous functions15533.26%
Constants165
▷ Global constants4426.67%
▷ Class constants12173.33%
▷ Public constants11796.69%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
101 PNG files occupy 4.57MB with 1.77MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_core/assets/img/pro-features/addons/multi-instructors.png30.30KB32.32KB0.00%
_core/assets/addons/email_branding.png8.45KB4.36KB▼ 48.45%
_core/assets/img/wizard/quiz/pagination@2x.png1.83KB1.62KB▼ 11.45%
_core/assets/img/pro-features/upcoming_nuxy_banner.png47.53KB13.88KB▼ 70.81%
_core/assets/img/coupon/sale_logo.png9.45KB3.46KB▼ 63.44%