84% celtic-lti

Code Review | ceLTIc LTI Library

WordPress plugin ceLTIc LTI Library scored84%from 54 tests.

About plugin

  • Plugin page: celtic-lti
  • Plugin version: 5.0.1
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.3
  • WordPress version: 6.3.1
  • First release: Jan 14, 2022
  • Latest release: Oct 21, 2023
  • Number of updates: 65
  • Update frequency: every 9.9 days
  • Top authors: spvickers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,631 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by ceLTIc LTI Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.09 ▼1.52
Dashboard /wp-admin3.31 ▲0.0142.77 ▼6.68
Posts /wp-admin/edit.php3.36 ▲0.0045.16 ▼5.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.34 ▲0.79
Media Library /wp-admin/upload.php3.23 ▲0.0036.29 ▼1.77

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for ceLTIc LTI Library
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.041.54 ▼0.0442.14 ▲3.23
Dashboard /wp-admin2,189 ▲95.57 ▼0.1083.01 ▼0.1438.28 ▼3.89
Posts /wp-admin/edit.php2,097 ▼32.04 ▼0.0034.70 ▼0.6732.91 ▼2.21
Add New Post /wp-admin/post-new.php1,535 ▲418.27 ▼4.84653.17 ▼23.4664.09 ▲14.25
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.02102.51 ▲3.0544.64 ▼2.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 64× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/ApiHook/ApiResourceLink.php on line 70
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\DataConnector\\DataConnector_pdo' not found in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/DataConnector/DataConnector_pdo_sqlite.php:13
    • > PHP Parse error
      syntax error, unexpected 'OutcomeType' (T_STRING) in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/Enum/OutcomeType.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'Firebase\\JWT\\JWTExceptionWithPayloadInterface' not found in wp-content/plugins/celtic-lti/vendor/firebase/php-jwt/src/ExpiredException.php:5
    • > PHP Parse error
      syntax error, unexpected 'LogLevel' (T_STRING) in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/Enum/LogLevel.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'ceLTIc\\LTI\\Http\\ClientInterface' not found in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/Http/CurlClient.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\Service\\Service' not found in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/Service/AssignmentGrade.php:15
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/System.php on line 211
    • > PHP Parse error
      syntax error, unexpected 'IdScope' (T_STRING) in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/Enum/IdScope.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'ceLTIc\\LTI\\DataConnector\\DataConnector_pdo' not found in wp-content/plugins/celtic-lti/vendor/celtic/lti/src/DataConnector/DataConnector_pdo_mysql.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
4 plugin tags: celtic, lti, ims, learning tools interoperability

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

"ceLTIc LTI Library" version 5.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
This plugin to installs the ceLTIc LTI class library for use by other plugins.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected19,698 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP1032,4758,84719,185
Markdown21390448
JSON20065

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 263)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity37.56
▷ Minimum class complexity1.00
▷ Maximum class complexity494.00
Average method complexity5.22
▷ Minimum method complexity1.00
▷ Maximum method complexity263.00
Code structure
Namespaces14
Interfaces2
Traits4
Classes88
▷ Abstract classes22.27%
▷ Concrete classes8697.73%
▷ Final classes11.16%
Methods776
▷ Static methods11114.30%
▷ Public methods65183.89%
▷ Protected methods364.64%
▷ Private methods8911.47%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants58
▷ Global constants00.00%
▷ Class constants58100.00%
▷ Public constants4984.48%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin