78% edunext-openedx-integrator

Code Review | Open edX LMS and WordPress integrator (LITE)

WordPress plugin Open edX LMS and WordPress integrator (LITE) scored78%from 54 tests.

About plugin

  • Plugin page: edunext-openedx-i...
  • Plugin version: 2.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Apr 18, 2018
  • Latest release: Nov 26, 2020
  • Number of updates: 32
  • Update frequency: every 29.8 days
  • Top authors: felipemontoya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,849 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.96ms] Passed 4 tests

An overview of server-side resources used by Open edX LMS and WordPress integrator (LITE)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.65 ▼0.27
Dashboard /wp-admin3.43 ▲0.1350.96 ▼4.33
Posts /wp-admin/edit.php3.55 ▲0.1952.11 ▲0.06
Add New Post /wp-admin/post-new.php6.09 ▲0.2095.06 ▲0.71
Media Library /wp-admin/upload.php3.35 ▲0.1242.43 ▲4.50
Course buttons /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=enrollment3.4450.86
All Open edX Enrollment Requests /wp-admin/edit.php?post_type=openedx_enrollment3.4239.89
EOX API /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=eoxapi3.3840.87
General settings /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=general3.4041.48
Navigation Settings /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=navigation3.4141.17
Woocommerce Integration /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=woocommerce3.4145.83

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wp-edunext-marketing-site_version
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Open edX LMS and WordPress integrator (LITE): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13914.23 ▼0.041.83 ▲0.0542.63 ▼0.62
Dashboard /wp-admin2,305 ▲1315.67 ▲0.0992.65 ▼9.0437.52 ▼4.66
Posts /wp-admin/edit.php2,210 ▲1072.02 ▼0.0044.93 ▲3.4636.22 ▼2.49
Add New Post /wp-admin/post-new.php6,478 ▲4,95018.67 ▼4.34919.02 ▲243.8563.47 ▲13.97
Media Library /wp-admin/upload.php1,507 ▲1104.24 ▲0.0598.10 ▲3.3945.07 ▲0.44
Course buttons /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=enrollment1,5863.3051.0669.42
All Open edX Enrollment Requests /wp-admin/edit.php?post_type=openedx_enrollment1,1751.9333.2133.50
EOX API /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=eoxapi1,1553.1755.0351.40
General settings /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=general1,2523.1840.8355.12
Navigation Settings /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=navigation1,2693.1139.4968.97
Woocommerce Integration /wp-admin/admin.php?page=wp-edunext-marketing-site_settings&tab=woocommerce1,4043.1740.0263.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • wp-edunext-marketing-site_version

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
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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/edunext-openedx-integrator/includes/templates/shortcode_help_meta_box.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/edunext-openedx-integrator/includes/templates/enrollment_settings_custom_header_html.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/edunext-openedx-integrator/includes/templates/general_settings_custom_header_html.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/edunext-openedx-integrator/includes/templates/eoxapi_settings_custom_header_html.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/edunext-openedx-integrator/includes/templates/woocommerce_settings_custom_header_html.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/edunext-openedx-integrator/includes/templates/overlay_html.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/edunext-openedx-integrator/includes/templates/exoapi_settings_custom_html.php:102
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/edunext-openedx-integrator/includes/templates/navigation_settings_custom_header_html.php:1

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (General Settings), #2 (Configuration of the User Menu), #3 (Addition of the User Menu), #4 (Configuration of the course buttons), #5 (Addition of course buttons), #6 (Woocommerce integration), #7 (EOX - API backend)
The official readme.txt is a good inspiration

edunext-openedx-integrator/wp-edunext-marketing-site.php 85% from 13 tests

The primary PHP file in "Open edX LMS and WordPress integrator (LITE)" version 2.6.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("edunext-openedx-integrator.php" instead of "wp-edunext-marketing-site.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,091 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP234881,0812,636
JavaScript96817385
CSS212170

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.15
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods109
▷ Static methods1311.93%
▷ Public methods10192.66%
▷ Protected methods65.50%
▷ Private methods21.83%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
There are no PNG files in this plugin