84% sensei-lms-divi

Code Review | Sensei LMS Modules for Divi

WordPress plugin Sensei LMS Modules for Divi scored84%from 54 tests.

About plugin

  • Plugin page: sensei-lms-divi
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2020
  • Latest release: Dec 28, 2022
  • Number of updates: 5
  • Update frequency: every 157.2 days
  • Top authors: donnapep (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,001 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Server-side resources used by Sensei LMS Modules for Divi
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.54 ▼3.75
Dashboard /wp-admin3.31 ▲0.0149.25 ▼2.36
Posts /wp-admin/edit.php3.36 ▲0.0052.92 ▲2.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.83 ▼11.54
Media Library /wp-admin/upload.php3.23 ▲0.0037.59 ▼2.24

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Sensei LMS Modules for Divi
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.281.54 ▼0.1340.11 ▼3.63
Dashboard /wp-admin2,198 ▲185.57 ▼0.1190.87 ▼4.1141.03 ▼5.29
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0040.63 ▲5.6736.65 ▲3.99
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▲0.15685.19 ▼18.2076.64 ▲24.16
Media Library /wp-admin/upload.php1,394 ▼04.25 ▲0.0599.60 ▼0.9544.52 ▼3.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sensei-lms-divi/sensei-lms-divi.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/sensei-lms-divi/includes/modules/course/description/description.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/sensei-lms-divi/includes/modules/lesson/title/title.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/sensei-lms-divi/includes/modules/course/title/title.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/sensei-lms-divi/includes/modules/lesson/description/description.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/sensei-lms-divi/includes/sensei-divi-extension.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: online course, sensei, divi

sensei-lms-divi/sensei-lms-divi.php 92% from 13 tests

The main PHP script in "Sensei LMS Modules for Divi" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin925 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP888272922
JavaScript3113

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods1878.26%
▷ Protected methods417.39%
▷ Private methods14.35%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin