84% tutor-lms-divi-modules

Code Review | Tutor LMS Divi Modules

WordPress plugin Tutor LMS Divi Modules scored84%from 54 tests.

About plugin

  • Plugin page: tutor-lms-divi-mo...
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jun 24, 2021
  • Latest release: Aug 17, 2023
  • Number of updates: 6
  • Update frequency: every 130.8 days
  • Top authors: themeum (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /11,228 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Tutor LMS Divi Modules
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.68 ▼2.18
Dashboard /wp-admin3.31 ▲0.0148.11 ▼8.85
Posts /wp-admin/edit.php3.36 ▲0.0051.71 ▼0.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.95 ▼21.00
Media Library /wp-admin/upload.php3.23 ▲0.0035.68 ▼0.80

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

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

Browser metrics Passed 4 tests

Tutor LMS Divi Modules: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.394.92 ▲2.8943.33 ▼0.98
Dashboard /wp-admin2,209 ▲185.91 ▲0.09100.69 ▼5.7839.89 ▼5.76
Posts /wp-admin/edit.php2,086 ▼62.04 ▲0.0539.97 ▼13.5334.22 ▼3.21
Add New Post /wp-admin/post-new.php1,533 ▲523.08 ▲4.88624.03 ▼7.4559.50 ▲2.77
Media Library /wp-admin/upload.php1,385 ▼64.20 ▼0.0595.76 ▼4.0646.31 ▲2.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 107× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/list/parts/level.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/list/card.php:12
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/loop/course-in-cart.php on line 17
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/carousel/classic.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/list/parts/footer.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/carousel/overlayed.php:12
    • > PHP Warning
      Use of undefined constant DTLMS_TEMPLATES - assumed 'DTLMS_TEMPLATES' (this will throw an Error in a future version of PHP) in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/list/grid/classic.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_tutor_course_thumbnail() in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/list/parts/thumbnail.php:3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/carousel/stacked.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tutor-lms-divi-modules/includes/templates/course/list/classic.php on line 10

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: learning management system, lms, tutor lms, education, divi lms modules...

tutor-lms-divi-modules/tutor-lms-divi-modules.php Passed 13 tests

Analyzing the main PHP file in "Tutor LMS Divi Modules" version 2.0.2
69 characters long description:
Easily design your courses and lessons on Divi builder with Tutor LMS

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
Good job! No executable or dangerous file extensions detected18,783 lines of code in 156 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121,5242,60617,661
CSS814913616
SVG28123368
JavaScript71318137
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity28.44
▷ Minimum class complexity2.00
▷ Maximum class complexity98.00
Average method complexity6.51
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods160
▷ Static methods5735.62%
▷ Public methods15999.38%
▷ Protected methods10.62%
▷ Private methods00.00%
Functions16
▷ Named functions743.75%
▷ Anonymous functions956.25%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/tutor-divi-logo.png6.27KB3.46KB▼ 44.81%