84% unilms

Code Review | UniLMS

WordPress plugin UniLMS scored84%from 54 tests.

About plugin

  • Plugin page: unilms
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.3
  • WordPress version: 6.3.1
  • First release: Mar 8, 2018
  • Latest release: Nov 25, 2020
  • Number of updates: 23
  • Update frequency: every 43.2 days
  • Top authors: junaidte14 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,177 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▼3.69ms] Passed 4 tests

An overview of server-side resources used by UniLMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.25 ▲0.7843.98 ▼6.17
Dashboard /wp-admin4.14 ▲0.8349.30 ▼0.13
Posts /wp-admin/edit.php4.19 ▲0.8350.84 ▼5.55
Add New Post /wp-admin/post-new.php6.65 ▲0.7687.70 ▼2.91
Media Library /wp-admin/upload.php3.99 ▲0.7641.70 ▲5.85
Course Files /wp-admin/edit.php?post_type=uni_lms_course_files4.0439.94
Lectures /wp-admin/edit.php?post_type=uni_lms_lectures4.0439.53
Activities /wp-admin/edit.php?post_type=uni_lms_quizzes4.0435.41
Attendances /wp-admin/edit.php?post_type=uni_lms_attendances4.0440.59
Students /wp-admin/edit.php?post_type=uni_lms_students4.0438.18
Courses /wp-admin/edit.php?post_type=uni_lms_courses4.0439.70
Settings /wp-admin/admin.php?page=uni_lms_settings3.9838.75
Classes /wp-admin/edit.php?post_type=uni_lms_classes4.0440.80
Dashboard /wp-admin/admin.php?page=unilms4.0841.17

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by UniLMS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10713.22 ▼1.151.73 ▼0.3241.61 ▼3.19
Dashboard /wp-admin2,257 ▲694.89 ▼0.02111.58 ▲3.4038.86 ▼3.94
Posts /wp-admin/edit.php2,140 ▲482.00 ▼0.0134.28 ▼4.3133.52 ▼3.46
Add New Post /wp-admin/post-new.php1,585 ▲7118.41 ▲0.90638.85 ▼46.4849.06 ▼6.98
Media Library /wp-admin/upload.php1,433 ▲454.20 ▲0.0297.85 ▼0.0641.94 ▼0.52
Course Files /wp-admin/edit.php?post_type=uni_lms_course_files1,1831.9335.1332.73
Lectures /wp-admin/edit.php?post_type=uni_lms_lectures1,1691.9431.3132.07
Activities /wp-admin/edit.php?post_type=uni_lms_quizzes1,1351.9328.7527.71
Attendances /wp-admin/edit.php?post_type=uni_lms_attendances1,1831.9331.1930.61
Students /wp-admin/edit.php?post_type=uni_lms_students1,1881.9331.6732.38
Courses /wp-admin/edit.php?post_type=uni_lms_courses1,1882.0030.6332.29
Settings /wp-admin/admin.php?page=uni_lms_settings1,0323.0143.1625.16
Classes /wp-admin/edit.php?post_type=uni_lms_classes1,1881.9531.4332.60
Dashboard /wp-admin/admin.php?page=unilms1,2952.0524.1927.42

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following
  • 51× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/unilms/plugin_pages/includes/teachers/teacher_course_class_mid_term.php:40
    • > PHP Notice
      Undefined variable: class_id in wp-content/plugins/unilms/plugin_pages/includes/teachers/teacher_course_class_final_term.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/unilms/uni_lms_templates/attendances/single-uni_lms_attendances.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/unilms/plugin_pages/includes/teachers/teacher_course_class_course_plan.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/unilms/plugin_pages/includes/teachers/teacher_course_class_attendance_short.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/unilms/uni_lms_templates/classes/single-uni_lms_classes.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/unilms/uni_lms_templates/courses/single-uni_lms_courses.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/unilms/uni_lms_templates/courses/archive-uni_lms_courses.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unilms/plugin_pages/includes/custom_posts/course_files/course_files.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/unilms/plugin_pages/includes/teachers/teacher_course_class_grad_policy.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: university management, learning management system, result management, lms, school management...

unilms/uni-lms.php 85% from 13 tests

The main file in "UniLMS" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("unilms.php" instead of "uni-lms.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
Success! There were no dangerous files found in this plugin8,261 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP466324266,906
CSS450531,317
JavaScript27438

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions119
▷ Named functions11697.48%
▷ Anonymous functions32.52%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%
css/images/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%
css/images/ui-icons_777777_256x240.png6.94KB4.18KB▼ 39.78%
css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%