84% uncanny-learndash-toolkit

Code Review | Uncanny Toolkit for LearnDash

WordPress plugin Uncanny Toolkit for LearnDash scored84%from 54 tests.

About plugin

  • Plugin page: uncanny-learndash...
  • Plugin version: 3.6.4.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2016
  • Latest release: Nov 23, 2023
  • Number of updates: 176
  • Update frequency: every 16.0 days
  • Top authors: uncannyowl (100%)

Code review

54 tests

User reviews

102 reviews

Install metrics

30,000+ active /664,745 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲5.34ms] 75% from 4 tests

Server-side resources used by Uncanny Toolkit for LearnDash
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,131.42ms on /wp-admin/admin.php?page=uncanny-toolkit-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6853.94 ▲13.32
Dashboard /wp-admin3.99 ▲0.6851.18 ▲1.79
Posts /wp-admin/edit.php4.05 ▲0.6848.75 ▲2.51
Add New Post /wp-admin/post-new.php6.53 ▲0.64102.68 ▲10.98
Media Library /wp-admin/upload.php3.85 ▲0.6238.63 ▲6.08
Modules /wp-admin/admin.php?page=uncanny-toolkit5.40529.88
Automation /wp-admin/admin.php?page=install-automator4.591,385.44
Help /wp-admin/admin.php?page=uncanny-toolkit-kb4.081,689.60
LearnDash Plugins /wp-admin/admin.php?page=uncanny-toolkit-plugins3.962,131.42

Server storage [IO: ▲1.42MB] [DB: ▲0.16MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Uncanny Toolkit for LearnDash
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21113.92 ▼0.3211.21 ▲9.2443.37 ▼1.00
Dashboard /wp-admin2,273 ▲995.67 ▲0.1386.68 ▼14.8036.17 ▼7.74
Posts /wp-admin/edit.php2,180 ▲802.04 ▲0.0941.12 ▼1.2837.11 ▼1.41
Add New Post /wp-admin/post-new.php1,563 ▲3723.20 ▲0.05642.64 ▼28.8053.83 ▼1.80
Media Library /wp-admin/upload.php1,466 ▲664.27 ▲0.1099.27 ▼7.1142.66 ▼1.99
Modules /wp-admin/admin.php?page=uncanny-toolkit5,7429.58217.43101.75
Automation /wp-admin/admin.php?page=install-automator1,5932.1055.8375.42
Help /wp-admin/admin.php?page=uncanny-toolkit-kb1,8672.4234.8841.77
LearnDash Plugins /wp-admin/admin.php?page=uncanny-toolkit-plugins1,3992.2531.2847.42

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 42× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'uncanny_learndash_toolkit\\Config' not found in wp-content/plugins/uncanny-learndash-toolkit/src/templates/admin-kb.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/uncanny-learndash-toolkit/src/templates/admin-siteinfo.php:91
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/uncanny-learndash-toolkit/src/includes/custom-walker-nav-menu.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'uncanny_learndash_toolkit\\FrontendLoginPlus' not found in wp-content/plugins/uncanny-learndash-toolkit/src/templates/frontend-login/layout_1-login.php:27
    • > PHP Notice
      Undefined variable: recaptcha_key in wp-content/plugins/uncanny-learndash-toolkit/src/templates/frontend-login/layout_1-lost-pwd.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uncanny-learndash-toolkit/uncanny-learndash-toolkit.php:61
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/uncanny-learndash-toolkit/src/uncanny-one-click-installer/includes/PluginSilentUpgraderSkin.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function uncanny_learndash_toolkit\\wp_login_url() in wp-content/plugins/uncanny-learndash-toolkit/src/templates/frontend-login/default-register.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function uncanny_learndash_toolkit\\get_option() in wp-content/plugins/uncanny-learndash-toolkit/src/templates/admin-help.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function uncanny_learndash_toolkit\\site_url() in wp-content/plugins/uncanny-learndash-toolkit/src/templates/frontend-login/default-lost-pwd.php:22

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: elearning, lms, learning, learndash, education...

uncanny-learndash-toolkit/uncanny-learndash-toolkit.php Passed 13 tests

"Uncanny Toolkit for LearnDash" version 3.6.4.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
116 characters long description:
Extend LearnDash with a variety of complementary features to make building engaging learner experiences even easier.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin17,901 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
PHP663,7884,76713,394
CSS95321032,067
JavaScript163743021,047
SVG1702863
PO File1166184513
Sass13011
Markdown1106

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.44
Average class complexity49.94
▷ Minimum class complexity1.00
▷ Maximum class complexity383.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes00.00%
Methods435
▷ Static methods23052.87%
▷ Public methods39891.49%
▷ Protected methods265.98%
▷ Private methods112.53%
Functions45
▷ Named functions3168.89%
▷ Anonymous functions1431.11%
Constants18
▷ Global constants1266.67%
▷ Class constants633.33%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/assets/backend/img/Uncanny-Owl-logo.png2.45KB2.51KB0.00%