72% dozent-lms

Code Review | Dozent LMS - Powerful WordPress LMS plugin

WordPress plugin Dozent LMS - Powerful WordPress LMS plugin scored72%from 54 tests.

About plugin

  • Plugin page: dozent-lms
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Jul 5, 2021
  • Latest release: Nov 20, 2021
  • Number of updates: 24
  • Update frequency: every 8.0 days
  • Top authors: themeqx (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,056 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▲2.33ms] 50% from 4 tests

Analyzing server-side resources used by Dozent LMS - Powerful WordPress LMS plugin
Please take the time to fix the following items
  • RAM: You should keep total memory usage under 10MB (currently 256.81MB on /wp-admin/edit.php?post_type=dozentlms_course)
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,012.28ms on /wp-admin/edit.php?post_type=dozentlms_course)
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1941.78 ▼2.75
Dashboard /wp-admin3.55 ▲0.2555.77 ▲12.14
Posts /wp-admin/edit.php3.62 ▲0.2655.52 ▲5.36
Add New Post /wp-admin/post-new.php6.10 ▲0.2297.46 ▲0.68
Media Library /wp-admin/upload.php3.40 ▲0.1740.03 ▲6.01
Instructors /wp-admin/admin.php?page=dozentlms-instructors3.4439.10
Frontend Dashboard /wp-admin/admin.php?page=dozentlms-frontend-dashboard3.2424.11
All Courses /wp-admin/edit.php?post_type=dozentlms_course256.811,012.28
Add-Ons /wp-admin/admin.php?page=dozentlms-addons3.4342.05
Categories /wp-admin/edit-tags.php?taxonomy=course_category&post_type=dozentlms_course3.4240.58
Settings /wp-admin/admin.php?page=dozentlms-settings3.4648.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 130 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
dozentlms_activation_time
dozentlms_settings
widget_theysaidso_widget
can_compress_scripts
dozentlms_version
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dozent LMS - Powerful WordPress LMS plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,101 ▲34415.34 ▲0.696.58 ▲4.6942.28 ▼8.28
Dashboard /wp-admin2,396 ▲2086.52 ▲0.63141.07 ▲36.3141.79 ▼5.42
Posts /wp-admin/edit.php2,300 ▲2113.45 ▲1.4750.33 ▲3.7930.16 ▼9.38
Add New Post /wp-admin/post-new.php1,558 ▲1623.33 ▲5.08676.64 ▲86.1735.93 ▼28.83
Media Library /wp-admin/upload.php1,436 ▲544.23 ▲0.0480.73 ▼15.4741.70 ▼0.71
Instructors /wp-admin/admin.php?page=dozentlms-instructors1,1353.2639.6624.87
Frontend Dashboard /wp-admin/admin.php?page=dozentlms-frontend-dashboard5551.6912.3723.53
All Courses /wp-admin/edit.php?post_type=dozentlms_course450.440.078.75
Add-Ons /wp-admin/admin.php?page=dozentlms-addons1,2773.1539.7172.42
Categories /wp-admin/edit-tags.php?taxonomy=course_category&post_type=dozentlms_course1,4733.3143.9826.88
Settings /wp-admin/admin.php?page=dozentlms-settings1,5423.4347.5664.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • dozentlms_settings
    • theysaidso_admin_options
    • dozentlms_version
    • dozentlms_activation_time
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=dozentlms_course
    • > Error in wp-includes/class-wp-query.php+602
    Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes)

SRP 50% 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 fix the following items
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'DOZENTLMS_ABSPATH/core/course/card-hooks.php' (include_path='.:/usr/share/php') in wp-content/plugins/dozent-lms/core/course/course-functions.php on line 2
    • > PHP Warning
      require(DOZENTLMS_ABSPATH/core/course/card-hooks.php): failed to open stream: No such file or directory in wp-content/plugins/dozent-lms/core/course/course-functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dozentlms_get_setting() in wp-content/plugins/dozent-lms/core/course/coursebuilder_header.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dozentlms_course_data_field_attrs() in wp-content/plugins/dozent-lms/core/course/data.php:2
    • > PHP Warning
      Use of undefined constant DOZENTLMS_ABSPATH - assumed 'DOZENTLMS_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dozent-lms/core/course/course-functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dozentlms_the_video() in wp-content/plugins/dozent-lms/templates/single/lecture/content.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dozent-lms/core/user/instructors-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dozentlms_get_var() in wp-content/plugins/dozent-lms/core/settings/panel.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dozent-lms/core/settings/functions-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/dozent-lms/core/course/coursebuilder.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=dozentlms_course
    • > Network (severe)
    wp-admin/edit.php?post_type=dozentlms_course - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

dozent-lms/dozent-lms.php Passed 13 tests

The entry point to "Dozent LMS - Powerful WordPress LMS plugin" version 1.2.4 is a PHP file that has certain tags in its header comment area
55 characters long description:
Easily create Learning Management System with WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin18,050 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
CSS107201808,112
PHP972,3341,3347,002
JavaScript73375182,815
SVG200121

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.30
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes30
▷ Abstract classes13.33%
▷ Concrete classes2996.67%
▷ Final classes00.00%
Methods163
▷ Static methods1710.43%
▷ Public methods15796.32%
▷ Protected methods10.61%
▷ Private methods53.07%
Functions162
▷ Named functions15897.53%
▷ Anonymous functions42.47%
Constants4
▷ Global constants4100.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
7 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
addons/ratings-reviews/thumbnail.png11.26KB5.35KB▼ 52.52%
addons/frontend-course-builder/thumbnail.png11.24KB5.66KB▼ 49.60%
addons/social-login/thumbnail.png31.30KB14.18KB▼ 54.70%
addons/edd/thumbnail.png4.35KB4.73KB0.00%
resources/images/placeholder-plugin.png2.89KB2.80KB▼ 3.21%