78% learndash-topic-progression-using-storyline-or-captivate

Code Review | Topic Progression Using Storyline/Captivate for LearnDash

WordPress plugin Topic Progression Using Storyline/Captivate for LearnDash scored78%from 54 tests.

About plugin

  • Plugin page: learndash-topic-p...
  • Plugin version: 1.2.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2016
  • Latest release: Sep 29, 2023
  • Number of updates: 63
  • Update frequency: every 42.5 days
  • Top authors: discoverelearning (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /14,462 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
Install script ran successfully

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

An overview of server-side resources used by Topic Progression Using Storyline/Captivate for LearnDash
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3342.88 ▼0.49
Dashboard /wp-admin3.96 ▲0.6655.96 ▼3.77
Posts /wp-admin/edit.php3.98 ▲0.6253.51 ▼0.53
Add New Post /wp-admin/post-new.php6.55 ▲0.66109.83 ▲2.51
Media Library /wp-admin/upload.php3.88 ▲0.6541.69 ▲4.22

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 342 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Topic Progression Using Storyline/Captivate for LearnDash
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.34 ▼0.211.87 ▼0.3744.04 ▼0.48
Dashboard /wp-admin2,211 ▲405.72 ▲0.1388.07 ▼6.1241.37 ▲0.43
Posts /wp-admin/edit.php2,119 ▲192.05 ▲0.0138.13 ▲0.0935.86 ▼2.67
Add New Post /wp-admin/post-new.php1,541 ▲1323.28 ▼0.00653.73 ▼20.2350.84 ▼13.07
Media Library /wp-admin/upload.php1,422 ▲224.26 ▲0.08101.80 ▲5.4850.34 ▲3.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/partials/quiz-mark-as-complete.php
    • > /wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/partials/quiz-next-page.php
  • 43× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/helper-functions.php:131
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/CMB2_Field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/partials/sfwd-mark-complete-form.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/learndash-topic-progression-storyline.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/learndash-topic-progression-using-storyline-or-captivate/CMB2/includes/types/CMB2_Type_Taxonomy_Radio.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: captivate, lms, learndash, elearning, storyline

learndash-topic-progression-using-storyline-or-captivate/learndash-topic-progression-storyline.php 92% from 13 tests

Analyzing the main PHP file in "Topic Progression Using Storyline/Captivate for LearnDash" version 1.2.4.3
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("learndash-topic-progression-using-storyline-or-captivate.php" instead of "learndash-topic-progression-storyline.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin45,704 lines of code in 199 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP602,2026,3617,396
CSS122501,1904,554
JavaScript73615831,431

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity19.09
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes913.04%
▷ Concrete classes6086.96%
▷ Final classes00.00%
Methods548
▷ Static methods9116.61%
▷ Public methods45683.21%
▷ Protected methods8916.24%
▷ Private methods30.55%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
CMB2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
CMB2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
CMB2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
CMB2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
CMB2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%