78% lmsace-connect

Code Review | LMSACE Connect - WooCommerce Moodle™ LMS Integration

WordPress plugin LMSACE Connect - WooCommerce Moodle™ LMS Integration scored78%from 54 tests.

About plugin

  • Plugin page: lmsace-connect
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6+-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 12, 2022
  • Latest release: Jul 25, 2023
  • Number of updates: 11
  • Update frequency: every 34.4 days
  • Top authors: lmsace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by LMSACE Connect - WooCommerce Moodle™ LMS Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.05 ▼7.57
Dashboard /wp-admin3.31 ▲0.0048.77 ▼2.04
Posts /wp-admin/edit.php3.36 ▲0.0045.15 ▼4.05
Add New Post /wp-admin/post-new.php5.89 ▲0.00108.96 ▲2.43
Media Library /wp-admin/upload.php3.23 ▲0.0037.72 ▲2.62

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for LMSACE Connect - WooCommerce Moodle™ LMS Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.061.75 ▼0.1540.61 ▼8.17
Dashboard /wp-admin2,206 ▲185.77 ▼0.25103.86 ▼4.1240.40 ▼2.25
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.0940.98 ▼7.3533.42 ▼4.23
Add New Post /wp-admin/post-new.php1,534 ▲122.97 ▼0.15613.95 ▼81.3478.28 ▲17.44
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.01106.17 ▼1.1843.57 ▼0.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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 items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lmsace-connect/lmsace-connect.php
    • > /wp-content/plugins/lmsace-connect/modules/sso/module.php
    • > /wp-content/plugins/lmsace-connect/templates/coursedata.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'LACONN_Main' not found in wp-content/plugins/lmsace-connect/includes/class-lac-course.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'LACONN_Main' not found in wp-content/plugins/lmsace-connect/modules/sso/includes/class-lacsso-user.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'LACONN_Main' not found in wp-content/plugins/lmsace-connect/includes/class-lac-woocom.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LACONN' not found in wp-content/plugins/lmsace-connect/modules/sso/includes/class-lacsso.php:12
    • > PHP Notice
      Trying to get property 'User' of non-object in wp-content/plugins/lmsace-connect/templates/mycourses.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_user() on null in wp-content/plugins/lmsace-connect/templates/mycourses.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #9 is required in lmsace-connect/assets to your readme.txt
  • Tags: You are using too many tags: 17 tag instead of maximum 10
Please take inspiration from this readme.txt

lmsace-connect/lmsace-connect.php 92% from 13 tests

The main PHP file in "LMSACE Connect - WooCommerce Moodle™ LMS Integration" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "4.6+")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,269 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP175801,3992,555
JavaScript43458397
CSS6184258
Markdown162059

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity33.75
▷ Minimum class complexity6.00
▷ Maximum class complexity74.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods177
▷ Static methods137.34%
▷ Public methods17598.87%
▷ Protected methods21.13%
▷ Private methods00.00%
Functions14
▷ Named functions1071.43%
▷ Anonymous functions428.57%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/defaultimage.png1.02KB0.94KB▼ 7.59%