84% pressbooks-lti-tool

Code Review | Pressbooks LTI Tool

WordPress plugin Pressbooks LTI Tool scored84%from 54 tests.

About plugin

  • Plugin page: pressbooks-lti-tool
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 2, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 11
  • Update frequency: every 33.9 days
  • Top authors: spvickers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by Pressbooks LTI Tool
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.51 ▲3.66
Dashboard /wp-admin3.31 ▼0.0443.78 ▼13.08
Posts /wp-admin/edit.php3.36 ▲0.0044.10 ▼1.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.93 ▼6.65
Media Library /wp-admin/upload.php3.23 ▲0.0031.22 ▼2.96

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Pressbooks LTI Tool: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.171.75 ▲0.0143.50 ▲2.52
Dashboard /wp-admin2,203 ▲155.83 ▼0.0696.36 ▼2.4539.44 ▼3.64
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0132.94 ▼4.9232.77 ▼0.64
Add New Post /wp-admin/post-new.php1,528 ▲923.23 ▲0.10672.82 ▼24.1152.30 ▼3.65
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0299.83 ▼10.5943.60 ▼2.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > 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/pressbooks-lti-tool/PressbooksTool.php on line 14
    • > 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/pressbooks-lti-tool/PressbooksTool.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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

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

"Pressbooks LTI Tool" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
138 characters long description:
This plugin allows Pressbooks 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 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin715 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP473133715

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.35
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity6.00
▷ Minimum method complexity3.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods133.33%
▷ Protected methods266.67%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/book.png0.46KB0.41KB▼ 12.18%