58% lti-tool

Code Review | LTI Tool

WordPress plugin LTI Tool scored58%from 54 tests.

About plugin

  • Plugin page: lti-tool
  • Plugin version: 3.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 22, 2022
  • Latest release: Oct 19, 2023
  • Number of updates: 30
  • Update frequency: every 20.4 days
  • Top authors: spvickers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,688 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by LTI Tool
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.83 ▼7.18
Dashboard /wp-admin3.31 ▼0.0448.50 ▼13.04
Posts /wp-admin/edit.php3.36 ▲0.0047.43 ▲0.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.80 ▼16.36
Media Library /wp-admin/upload.php3.23 ▲0.0032.33 ▼3.65

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

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

Browser metrics Passed 4 tests

LTI Tool: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.481.66 ▲0.0838.23 ▲0.29
Dashboard /wp-admin2,192 ▲155.57 ▲0.0482.65 ▼3.3236.30 ▼3.49
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0239.80 ▼2.7736.34 ▲0.07
Add New Post /wp-admin/post-new.php1,526 ▼023.61 ▲0.66678.92 ▲15.1165.38 ▲18.81
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0295.40 ▼6.1842.69 ▼1.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/lti-tool/includes/lib.php+717
    Uncaught Error: Class 'ceLTIc\LTI\Tool' not found in wp-content/plugins/lti-tool/includes/lib.php:717
    Stack trace:
    #0 wp-content/plugins/lti-tool/uninstall.php(39): lti_tool_get_options()
    #1 wp-admin/includes/plugin.php(1245): include_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 27 files (0.21MB) in the plugin directory
    • (new file) includes/AddLTIPlatform.php
    • (new file) includes/CanvasXML.php
    • (new file) css/register.css
    • (new file) includes/CanvasJSON.php
    • (new file) images/1edtech-20.png
    • (new file) includes/DoAddLTIPlatform.php
    • (new file) images/wp.png
    • (new file) includes/DoSaveOptions.php
    • (new file) images/loading.gif
    • (new file) includes/LTI_Tool_List_Keys.php
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lti-tool/js/registerjs.php
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/template.php): failed to open stream: No such file or directory in wp-content/plugins/lti-tool/includes/DoSaveOptions.php on line 23
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/lti-tool/includes/DoSaveOptions.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lti-tool/includes/LTI_Tool_User_List_Table.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/lti-tool/includes/CanvasXML.php:84
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\Tool' not found in wp-content/plugins/lti-tool/includes/WPTool.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lti_tool_get_options() in wp-content/plugins/lti-tool/includes/jwks.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/lti-tool/includes/XML.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/lti-tool/includes/CanvasJSON.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lti-tool/includes/LTI_Tool_List_Table.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/lti-tool/includes/LTI_Tool_List_Keys.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: learning tools interoperability, 1edtech, celtic, lti, ims

lti-tool/lti-tool.php 92% from 13 tests

Analyzing the main PHP file in "LTI Tool" version 3.2.3
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 162 characters long)

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
Everything looks great! No dangerous files found in this plugin3,608 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP206038993,522
CSS10044
JavaScript26042

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.60
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods51
▷ Static methods713.73%
▷ Public methods3976.47%
▷ Protected methods917.65%
▷ Private methods35.88%
Functions93
▷ Named functions8187.10%
▷ Anonymous functions1212.90%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wp.png1.76KB1.74KB▼ 1.55%
images/1edtech-20.png0.61KB0.50KB▼ 18.15%