10% edwiser-bridge

Code Review | Edwiser Bridge - WordPress Moodle LMS Integration

WordPress plugin Edwiser Bridge - WordPress Moodle LMS Integration scored10%from 54 tests.

About plugin

  • Plugin page: edwiser-bridge
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Jul 1, 2015
  • Latest release: Nov 8, 2023
  • Number of updates: 98
  • Update frequency: every 31.2 days
  • Top authors: WisdmLabs (100%)

Code review

54 tests

User reviews

67 reviews

Install metrics

5,000+ active /141,176 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/edwiser-bridge/includes/eb-core-functions.php+1223
    file_get_contents(wp-content/uploads/eb-logs/log.json): failed to open stream: No such file or directory

Server metrics [RAM: ▲3.44MB] [CPU: ▲16.15ms] Passed 4 tests

An overview of server-side resources used by Edwiser Bridge - WordPress Moodle LMS Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.53 ▲3.0660.29 ▲20.53
Dashboard /wp-admin6.91 ▲3.5667.19 ▲5.08
Posts /wp-admin/edit.php6.96 ▲3.6073.14 ▲26.47
Add New Post /wp-admin/post-new.php9.46 ▲3.57108.30 ▲12.51
Media Library /wp-admin/upload.php6.78 ▲3.5464.77 ▲31.27
Course Categories /wp-admin/edit-tags.php?taxonomy=eb_course_cat&post_type=eb_course6.7756.36
Manage Email Templates /wp-admin/edit.php?post_type=eb_course&page=eb-email-template6.7955.58
Manage Enrollment /wp-admin/edit.php?post_type=eb_course&page=mucp-manage-enrollment6.7558.49
Courses /wp-admin/edit.php?post_type=eb_course6.8761.04
Settings /wp-admin/edit.php?post_type=eb_course&page=eb-settings7.5369.14
Orders /wp-admin/edit.php?post_type=eb_order6.8757.78

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 234 new files
Database: 1 new table, 33 new options
New tables
wp_moodle_enrollment
New WordPress options
eb_setup_wizard_completed
db_upgraded
eb_emailtmpl_course_access_expir
eb_mdl_plugin_update_check
eb_renamed_lang_files
widget_recent-posts
eb_emailtmpl_refund_completion_notifier_to_user_notify_allow
eb_emailtmpl_new_user_email_verification
eb_emailtmpl_mdl_enrollment_trigger_notify_allow
eb_emailtmpl_new_user_email_verification_notify_allow
...

Browser metrics Passed 4 tests

An overview of browser requirements for Edwiser Bridge - WordPress Moodle LMS Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,111 ▲34914.58 ▲0.2415.51 ▲13.9126.00 ▼16.41
Dashboard /wp-admin2,361 ▲1815.49 ▼0.15110.42 ▲19.5999.70 ▲57.88
Posts /wp-admin/edit.php2,287 ▲1872.59 ▲0.6247.01 ▲10.9048.63 ▲11.90
Add New Post /wp-admin/post-new.php1,674 ▲14822.39 ▼0.74664.99 ▲0.7759.53 ▲10.86
Media Library /wp-admin/upload.php1,572 ▲1755.03 ▲0.85107.81 ▲8.2578.46 ▲35.83
Course Categories /wp-admin/edit-tags.php?taxonomy=eb_course_cat&post_type=eb_course1,4572.4840.6542.99
Manage Email Templates /wp-admin/edit.php?post_type=eb_course&page=eb-email-template1,8506.12145.28100.85
Manage Enrollment /wp-admin/edit.php?post_type=eb_course&page=mucp-manage-enrollment1,2882.4831.1744.65
Courses /wp-admin/edit.php?post_type=eb_course1,3122.5839.4545.13
Settings /wp-admin/edit.php?post_type=eb_course&page=eb-settings2,2765.9263.4871.28
Orders /wp-admin/edit.php?post_type=eb_order1,2672.5743.0743.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_moodle_enrollment
  • This plugin did not uninstall successfully, leaving 33 options in the database
    • eb_emailtmpl_create_user_notify_allow
    • eb_emailtmpl_refund_completion_notifier_to_admin_notify_allow
    • widget_theysaidso_widget
    • widget_recent-comments
    • eb_emailtmpl_refund_completion_notifier_to_admin
    • eb_renamed_lang_files
    • eb_emailtmpl_mdl_un_enrollment_trigger_notify_allow
    • eb_emailtmpl_order_completed
    • can_compress_scripts
    • eb_emailtmpl_refund_completion_notifier_to_user
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
10 plugin tags: moodle integration, woocommerce, moodle wordpress, moodle, moodle ecommerce...

edwiser-bridge/edwiser-bridge.php 92% from 13 tests

The main file in "Edwiser Bridge - WordPress Moodle LMS Integration" v. 3.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 302 characters long)

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
There were no executable files found in this plugin53,650 lines of code in 163 files:
LanguageFilesBlank linesComment linesLines of code
PHP1033,8948,30621,424
JavaScript112,8861,12312,790
CSS97923498,523
PO File43,0713,9567,105
Sass1328241,520
LESS1328341,510
SVG1000778

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity30.57
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes79
▷ Abstract classes11.27%
▷ Concrete classes7898.73%
▷ Final classes00.00%
Methods709
▷ Static methods9112.83%
▷ Public methods57380.82%
▷ Protected methods182.54%
▷ Private methods11816.64%
Functions65
▷ Named functions6396.92%
▷ Anonymous functions23.08%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
50 PNG files occupy 2.06MB with 1.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/selective_sync.png89.91KB28.64KB▼ 68.14%
admin/assets/images/icon-woo-int.png5.09KB3.41KB▼ 32.90%
admin/assets/images/sso_social.png76.99KB23.29KB▼ 69.75%
admin/assets/images/sso.png19.20KB5.60KB▼ 70.82%
admin/assets/images/selective_users.png136.08KB42.73KB▼ 68.60%