93% dokeos

Code Review | Dokeos LMS

WordPress plugin Dokeos LMS scored 93% from 54 tests.

About plugin

  • Plugin page: dokeos
  • Plugin version: 0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 0.5-5.6
  • WordPress version: 5.8.1
  • First release: May 29, 2020
  • Latest release: Mar 5, 2021
  • Number of updates: 16
  • Update frequency: every 17.5 days
  • Top authors: dokeos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 312 total downloads

Benchmarks

Plugin footprint Passed 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.04MB] [CPU: ▼142.82ms] Passed 4 tests

Analyzing server-side resources used by Dokeos LMS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1637.90 ▲13.90
Dashboard /wp-admin3.10 ▲0.0542.75 ▼2.70
Posts /wp-admin/edit.php3.16 ▲0.0557.92 ▲5.79
Add New Post /wp-admin/post-new.php5.46 ▲0.0395.84 ▼570.40
Media Library /wp-admin/upload.php3.05 ▲0.0535.82 ▼3.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Dokeos LMS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲11915.87 ▲0.5010.45 ▲0.4051.19 ▲5.91
Dashboard /wp-admin2,998 ▲645.98 ▲0.04166.95 ▼14.34191.46 ▲74.94
Posts /wp-admin/edit.php2,753 ▲142.72 ▲0.0080.05 ▲8.10108.33 ▲6.80
Add New Post /wp-admin/post-new.php1,623 ▲821.39 ▲0.00304.24 ▼16.89104.75 ▼1.31
Media Library /wp-admin/upload.php1,819 ▲125.03 ▲0.02160.01 ▼16.95115.14 ▼7.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Unterminated comment starting line 1 in wp-content/plugins/dokeos/index.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dokeos/inc/init.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dokeos/inc/functions.php:9
    • > PHP Warning
      Unterminated comment starting line 1 in wp-content/plugins/dokeos/inc/index.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif).), #2 (This is the second screen shot)
The official readme.txt might help

dokeos/dokeos-woocommerce-main.php 85% from 13 tests

The main PHP file in "Dokeos LMS" ver. 0.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dokeos.php" instead of "dokeos-woocommerce-main.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected239 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP58556232
CSS1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin