84% mycred-tutor-lms-gamification-in-elearning

Code Review | myCred Tutor LMS - Gamification in eLearning

WordPress plugin myCred Tutor LMS - Gamification in eLearning scored84%from 54 tests.

About plugin

  • Plugin page: mycred-tutor-lms-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 20, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 25
  • Update frequency: every 33.6 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,544 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.13ms] Passed 4 tests

This is a short check of server-side resources used by myCred Tutor LMS - Gamification in eLearning
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.66 ▲2.96
Dashboard /wp-admin3.35 ▲0.0546.36 ▼0.85
Posts /wp-admin/edit.php3.47 ▲0.1152.23 ▲1.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0595.54 ▲8.09
Media Library /wp-admin/upload.php3.27 ▲0.0535.39 ▼4.24

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

myCred Tutor LMS - Gamification in eLearning: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5814.04 ▼0.121.95 ▲0.4043.43 ▼3.34
Dashboard /wp-admin2,197 ▲205.59 ▼0.0786.17 ▼8.4940.20 ▼5.50
Posts /wp-admin/edit.php2,105 ▲22.01 ▲0.0539.10 ▼1.7636.93 ▲0.68
Add New Post /wp-admin/post-new.php1,601 ▲7523.43 ▲0.21602.36 ▼176.5832.69 ▼16.09
Media Library /wp-admin/upload.php1,402 ▲84.15 ▼0.0696.68 ▼6.6641.75 ▼3.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mycred-tutor-lms-gamification-in-elearning/mycred-tutor-lms.php:103

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: quiz, gamification, elearning, mycred, lms

mycred-tutor-lms-gamification-in-elearning/mycred-tutor-lms.php 85% from 13 tests

This is the main PHP file of "myCred Tutor LMS - Gamification in eLearning" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mycred-tutor-lms-gamification-in-elearning.php" instead of "mycred-tutor-lms.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
No dangerous file extensions were detected2,097 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP84992601,898
JavaScript1580199

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity39.00
▷ Minimum class complexity8.00
▷ Maximum class complexity51.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods60
▷ Static methods11.67%
▷ Public methods5795.00%
▷ Protected methods00.00%
▷ Private methods35.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin