10% moodle-course-list-widget

Code Review | Moodle Course List Widget

WordPress plugin Moodle Course List Widget scored10%from 54 tests.

About plugin

  • Plugin page: moodle-course-lis...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2013
  • Latest release: Feb 28, 2013
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: kennibc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /5,934 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/moodle-course-list-widget/moodle-courselist-widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; iLearn_Courses has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼60.24ms] Passed 4 tests

A check of server-side resources used by Moodle Course List Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.395.53 ▼35.55
Dashboard /wp-admin2.10 ▼1.215.86 ▼50.97
Posts /wp-admin/edit.php2.10 ▼1.266.05 ▼49.88
Add New Post /wp-admin/post-new.php2.10 ▼3.795.77 ▼104.55
Media Library /wp-admin/upload.php2.10 ▼1.135.62 ▼32.37

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Moodle Course List Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.101.66 ▼0.0937.50 ▼6.18
Dashboard /wp-admin2,192 ▲185.52 ▲0.0082.74 ▼18.2137.34 ▼10.44
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0839.92 ▲2.8735.69 ▼0.48
Add New Post /wp-admin/post-new.php1,526 ▼222.99 ▼0.19671.74 ▲6.0857.14 ▲3.25
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.03115.14 ▲8.5546.89 ▼1.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/moodle-course-list-widget/moodle-courselist-widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; iLearn_Courses has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_moodlecourses-widget
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/moodle-course-list-widget/moodle-courselist-widget.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: learning, courses, students, teachers, moodle...

moodle-course-list-widget/moodle-courselist-widget.php 92% from 13 tests

Analyzing the main PHP file in "Moodle Course List Widget" version 1.0
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("moodle-course-list-widget.php" instead of "moodle-courselist-widget.php")

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 plugin80 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1371080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin