84% lti-tool-learndash

Code Review | LTI Connector for LearnDash

WordPress plugin LTI Connector for LearnDash scored84%from 54 tests.

About plugin

  • Plugin page: lti-tool-learndash
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2023
  • Latest release: Aug 9, 2023
  • Number of updates: 6
  • Update frequency: every 8.8 days
  • Top authors: spvickers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /99 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.97ms] Passed 4 tests

An overview of server-side resources used by LTI Connector for LearnDash
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.95 ▲1.79
Dashboard /wp-admin3.31 ▼0.0443.70 ▼12.01
Posts /wp-admin/edit.php3.36 ▲0.0043.14 ▼7.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.15 ▼6.23
Media Library /wp-admin/upload.php3.23 ▲0.0032.62 ▼2.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for LTI Connector for LearnDash
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.73 ▼0.981.73 ▼0.0744.19 ▼5.65
Dashboard /wp-admin2,206 ▲184.87 ▼1.0099.92 ▼9.8437.85 ▼2.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0141.17 ▲3.8431.64 ▼4.67
Add New Post /wp-admin/post-new.php1,533 ▲1423.00 ▼0.12668.92 ▼9.6548.21 ▼4.84
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.0895.29 ▼2.5341.70 ▼2.32

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/lti-tool/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/lti-tool-learndash/LearnDashTool.php on line 12
    • > PHP Warning
      require_once(wp-content/plugins/lti-tool/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/lti-tool-learndash/LearnDashTool.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
7 plugin tags: tool, learndash, ims, lti, 1edtech...

lti-tool-learndash/lti-tool-learndash.php Passed 13 tests

The entry point to "LTI Connector for LearnDash" version 1.0.0 is a PHP file that has certain tags in its header comment area
137 characters long description:
This plugin allows LearnDash to be integrated with on-line courses using the 1EdTech Learning Tools Interoperability (LTI) specification.

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
Everything looks great! No dangerous files found in this plugin478 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP473166478

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.50
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods125.00%
▷ Private methods00.00%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin