84% unenroll-for-learndash

Code Review | Unenroll For Learndash

WordPress plugin Unenroll For Learndash scored84%from 54 tests.

About plugin

  • Plugin page: unenroll-for-lear...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 21, 2021
  • Latest release: Feb 2, 2022
  • Number of updates: 6
  • Update frequency: every 27.5 days
  • Top authors: maurolopes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /718 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.74ms] Passed 4 tests

An overview of server-side resources used by Unenroll For Learndash
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1346.12 ▲5.79
Dashboard /wp-admin3.41 ▲0.1058.57 ▲3.40
Posts /wp-admin/edit.php3.46 ▲0.1056.23 ▲1.74
Add New Post /wp-admin/post-new.php5.99 ▲0.1094.49 ▼9.97
Media Library /wp-admin/upload.php3.33 ▲0.1042.37 ▲1.88
Unenroll /wp-admin/admin.php?page=learndash-unenroll3.3038.17

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

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

Browser metrics Passed 4 tests

Unenroll For Learndash: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.50 ▼1.2013.33 ▲11.6043.11 ▲4.78
Dashboard /wp-admin2,192 ▲155.58 ▲0.0093.13 ▼1.3644.54 ▲5.34
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0134.45 ▼6.1836.04 ▼0.71
Add New Post /wp-admin/post-new.php1,536 ▲823.22 ▲0.14689.52 ▲17.3051.55 ▼11.59
Media Library /wp-admin/upload.php1,397 ▼04.16 ▲0.0899.08 ▼17.7744.67 ▼2.54
Unenroll /wp-admin/admin.php?page=learndash-unenroll1,0611.9923.2140.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/unenroll-for-learndash/admin/trun-settings.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
5 plugin tags: learning, learndash, education, elearning, lms

unenroll-for-learndash/learndash-unenroll.php 85% from 13 tests

The main PHP script in "Unenroll For Learndash" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("unenroll-for-learndash.php" instead of "learndash-unenroll.php")

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
No dangerous file extensions were detected934 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP38050528
CSS3223204
JavaScript2124131
PO File1254371

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin