84% lti-platform

Code Review | LTI Platform

WordPress plugin LTI Platform scored84%from 54 tests.

About plugin

  • Plugin page: lti-platform
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 24, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 24
  • Update frequency: every 21.0 days
  • Top authors: spvickers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /753 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by LTI Platform
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.64 ▼6.50
Dashboard /wp-admin3.31 ▲0.0044.78 ▼7.42
Posts /wp-admin/edit.php3.36 ▲0.0045.22 ▼1.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.34 ▼1.02
Media Library /wp-admin/upload.php3.23 ▲0.0034.39 ▲1.46

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for LTI Platform
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.042.08 ▲0.2943.35 ▲0.08
Dashboard /wp-admin2,206 ▲185.91 ▲1.00107.84 ▲3.1140.72 ▼2.93
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0638.50 ▼1.3334.41 ▼4.17
Add New Post /wp-admin/post-new.php1,514 ▼617.47 ▼6.09657.47 ▼21.3252.05 ▼3.67
Media Library /wp-admin/upload.php1,388 ▲64.16 ▼0.0893.85 ▼2.6643.42 ▲1.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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)
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
Almost there! Just fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\DataConnector\\DataConnector' not found in wp-content/plugins/lti-platform/includes/class-lti-platform-dataconnector.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/lti-platform/admin/partials/lti-platform-admin-settings.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\Tool' not found in wp-content/plugins/lti-platform/includes/class-lti-platform-tool.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\Platform' not found in wp-content/plugins/lti-platform/includes/class-lti-platform-platform_v5.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/lti-platform/admin/partials/lti-platform-admin-edit.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\DataConnector\\DataConnector' not found in wp-content/plugins/lti-platform/includes/class-lti-platform-dataconnector_v5.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'LTI_Platform_Tool_List_Table' not found in wp-content/plugins/lti-platform/admin/partials/lti-platform-admin-view.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\Platform' not found in wp-content/plugins/lti-platform/includes/class-lti-platform-platform.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lti-platform/admin/class-lti-platform-tool-list-table.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: lti, 1edtech, celtic, ims, learning tools interoperability...

lti-platform/lti-platform.php Passed 13 tests

Analyzing the main PHP file in "LTI Platform" version 2.2.0
135 characters long description:
This plugin allows WordPress to act as a Platform using the 1EdTech (formerly) IMS 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 plugin2,841 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP183481,7402,704
JavaScript24086
CSS12023
JSON10021
Markdown1607

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity35.64
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods140
▷ Static methods1812.86%
▷ Public methods10776.43%
▷ Protected methods139.29%
▷ Private methods2014.29%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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