89% adaptive-learning-with-learndash

Code Review | Adaptive Learning With LearnDash

WordPress plugin Adaptive Learning With LearnDash scored 89% from 54 tests.

About plugin

  • Plugin page: adaptive-learning...
  • Plugin version: 1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.7.2
  • WordPress version: 5.9.2
  • First release: Feb 25, 2017
  • Latest release: May 17, 2021
  • Number of updates: 36
  • Update frequency: every 42.8 days
  • Top authors: wooninjas (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 7,014 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼295.85ms] Passed 4 tests

A check of server-side resources used by Adaptive Learning With LearnDash
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0195.92 ▲45.17
Dashboard /wp-admin3.41 ▲0.0037.04 ▲2.12
Posts /wp-admin/edit.php3.64 ▲0.0035.78 ▼3.25
Add New Post /wp-admin/post-new.php6.88 ▼0.09101.95 ▼1,185.33
Media Library /wp-admin/upload.php3.29 ▲0.0028.54 ▲3.06

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 1 new option
New WordPress options
al_version

Browser metrics Passed 4 tests

An overview of browser requirements for Adaptive Learning With LearnDash
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,897 ▲14316.44 ▲0.825.92 ▼0.232.10 ▼0.79
Dashboard /wp-admin2,895 ▲375.99 ▼0.13122.38 ▼15.41163.71 ▼3.06
Posts /wp-admin/edit.php2,691 ▼03.24 ▼0.1396.24 ▲30.36170.48 ▲25.14
Add New Post /wp-admin/post-new.php1,661 ▼2916.18 ▼5.21434.08 ▼5.63195.32 ▲5.53
Media Library /wp-admin/upload.php1,698 ▲35.51 ▼0.02141.98 ▲4.78193.76 ▼53.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • al_version

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt might help

adaptive-learning-with-learndash/adaptive-learning-with-learndash.php 92% from 13 tests

Analyzing the main PHP file in "Adaptive Learning With LearnDash" version 1.6
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,042 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP8224298856
JavaScript21644109
CSS30077

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity24.00
▷ Minimum class complexity3.00
▷ Maximum class complexity98.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods39
▷ Static methods2974.36%
▷ Public methods3897.44%
▷ Protected methods12.56%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png49.41KB25.59KB▼ 48.21%
assets/screenshot-2.png10.10KB5.51KB▼ 45.43%
assets/screenshot-4.png11.41KB6.34KB▼ 44.38%
assets/screenshot-3.png12.24KB7.07KB▼ 42.29%