83% course-redirects-for-learndash

Code Review | Course Redirects for Learndash Plugin

WordPress plugin Course Redirects for Learndash Plugin scored83%from 54 tests.

About plugin

  • Plugin page: course-redirects-...
  • Plugin version: 0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 15, 2021
  • Latest release: Apr 1, 2023
  • Number of updates: 27
  • Update frequency: every 27.8 days
  • Top authors: ercbs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,987 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.17ms] Passed 4 tests

Server-side resources used by Course Redirects for Learndash Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0937.39 ▼3.59
Dashboard /wp-admin3.39 ▲0.0845.06 ▼2.71
Posts /wp-admin/edit.php3.44 ▲0.0849.35 ▲0.79
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.30 ▲4.91
Media Library /wp-admin/upload.php3.31 ▲0.0836.08 ▲4.83
Visitor & Views Counter /wp-admin/admin.php?page=visitor-views-counter3.2830.77
Dashboard /wp-admin/admin.php?page=vvc-counter3.2826.52
Course Redirects for Learndash /wp-admin/admin.php?page=page-settings3.2731.54

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: 2 new tables, 9 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Course Redirects for Learndash Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲24114.03 ▼0.3610.19 ▲8.5437.22 ▼4.51
Dashboard /wp-admin2,232 ▲415.88 ▲0.0196.92 ▼2.8142.30 ▼0.31
Posts /wp-admin/edit.php2,140 ▲512.00 ▼0.0440.41 ▼1.5635.71 ▼0.02
Add New Post /wp-admin/post-new.php1,569 ▲3618.38 ▼4.88582.82 ▼77.9356.57 ▼9.15
Media Library /wp-admin/upload.php1,417 ▲294.31 ▲0.1596.70 ▼1.0043.33 ▲2.30
Visitor & Views Counter /wp-admin/admin.php?page=visitor-views-counter8533.86115.9524.62
Dashboard /wp-admin/admin.php?page=vvc-counter8583.90113.6821.28
Course Redirects for Learndash /wp-admin/admin.php?page=page-settings8042.0524.9528.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • vvc_simple_hits_counter_version
    • widget_recent-comments
    • migrated_to_version
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • vvc_update_ran

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/course-redirects-for-learndash/redirect_course.php:32

User-side errors Passed 1 test

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


Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Invalid URI ("paypal.me/cbs1989")
  • Screenshots: Please add an image for screenshot #2 (Page Id's)
  • Screenshots: Please describe screenshot #0 in course-redirects-for-learndash/assets to your readme.txt
You can look at the official readme.txt

course-redirects-for-learndash/redirect_course.php 92% from 13 tests

The primary PHP file in "Course Redirects for Learndash Plugin" version 0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("course-redirects-for-learndash.php" instead of "redirect_course.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected414 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing 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.24
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1688.89%
▷ Anonymous functions211.11%
▷ Global constants00.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
No PNG files were detected