56% wisdm-reports-for-learndash

Code Review | WISDM Reports For LearnDash

WordPress plugin WISDM Reports For LearnDash scored56%from 54 tests.

About plugin

  • Plugin page: wisdm-reports-for...
  • Plugin version: 1.8.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2022
  • Latest release: Sep 27, 2023
  • Number of updates: 56
  • Update frequency: every 10.4 days
  • Top authors: WisdmLabs (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /15,550 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.45MB] [CPU: ▲7.11ms] Passed 4 tests

Server-side resources used by WISDM Reports For LearnDash
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3551.66 ▲8.80
Dashboard /wp-admin3.81 ▲0.5062.58 ▲13.51
Posts /wp-admin/edit.php3.89 ▲0.5461.34 ▲9.38
Add New Post /wp-admin/post-new.php6.37 ▲0.4996.82 ▲1.01
Media Library /wp-admin/upload.php3.70 ▲0.4745.87 ▲9.26
Dashboard /wp-admin/admin.php?page=wrld-dashboard-page3.7446.47
What's new /wp-admin/admin.php?page=wrld-whatsnew3.7844.95
Settings /wp-admin/admin.php?page=wrld-settings3.9347.80
More Plugins /wp-admin/admin.php?page=wrld-other-plugins3.6945.82
Help /wp-admin/admin.php?page=wrld-help3.7146.60
Gutenberg Blocks /wp-admin/admin.php?page=wrld-gutenbergblocks3.8656.07

Server storage [IO: ▲58.54MB] [DB: ▲0.01MB] 33% from 3 tests

Filesystem and database footprint
Please fix the following
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/wisdm-reports-for-learndash/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
  • The filesystem usage should be lower than 25MB (currently using 58.54MB)
Filesystem: 643 new files
Database: 4 new tables, 14 new options
New tables
wp_wrld_cached_entries
wp_ld_quiz_entries
wp_ld_time_entries
wp_ld_course_time_spent
New WordPress options
wrld_settings
wrld_whats_new_tab_visited
theysaidso_admin_options
wrld_gutenbergblocks_visited
wrld_db_version
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
recovery_mode_email_last_sent
...

Browser metrics Passed 4 tests

Checking browser requirements for WISDM Reports For LearnDash
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲31614.18 ▼0.4110.37 ▲8.5641.34 ▲3.34
Dashboard /wp-admin2,361 ▲1585.16 ▲0.27122.31 ▲18.5874.47 ▲34.63
Posts /wp-admin/edit.php2,243 ▲1462.36 ▲0.3344.50 ▲9.0639.02 ▲4.82
Add New Post /wp-admin/post-new.php1,621 ▲9017.91 ▼5.37741.63 ▲119.1637.27 ▼14.33
Media Library /wp-admin/upload.php1,534 ▲1344.41 ▲0.20102.60 ▼14.8971.63 ▲25.25
Dashboard /wp-admin/admin.php?page=wrld-dashboard-page1,2452.3629.6459.69
What's new /wp-admin/admin.php?page=wrld-whatsnew1,7611.9742.84125.28
Settings /wp-admin/admin.php?page=wrld-settings1,1911.147.7322.97
More Plugins /wp-admin/admin.php?page=wrld-other-plugins1,1472.2431.9138.86
Help /wp-admin/admin.php?page=wrld-help1,3102.2429.6839.94
Gutenberg Blocks /wp-admin/admin.php?page=wrld-gutenbergblocks2,1922.0741.46320.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/class-dashboard.php+328
    Trying to get property 'acf' of non-object
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_ld_quiz_entries
    • wp_ld_time_entries
    • wp_ld_course_time_spent
    • wp_wrld_cached_entries
  • The uninstall procedure has failed, leaving 14 options in the database
    • wrld_gutenbergblocks_visited
    • wrld_free_plugin_first_activated
    • wrld_whats_new_tab_visited
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • ldrp_reporting_page
    • wrld_settings
    • wrld_db_version
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wrld-whatsnew
    • > Warning in wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/templates/post-container.php+8
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=wrld-settings
    • > Error in wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/class-settingspage.php+366
    Uncaught Error: Class 'WRLD_Common_Functions' not found in wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/class-settingspage.php:366
    Stack trace:
    #0 wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/class-settingspage.php(107): WRLDAdmin\SettingsPage::get_users_exclude_setting()
    #1 wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/class-settingspage.php(53): WRLDAdmin\SettingsPage::content_main()
    #2 wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/class-dashboard.php(135): WRLDAdmin\SettingsPage::render()
    #3 wp-includes/class-wp-hook.php(310): WRLDAdmin\Dashboard->settings_page_content()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 23× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wisdm-reports-for-learndash/includes/admin/dashboard/templates/single-post-feature.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/admin-modal-time-spent.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/admin-modal.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/bfcm-banner.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/admin-modal-course-progress.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/admin-modal-free-users.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/review-notification.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WisdmReportsLearndash\\add_action() in wp-content/plugins/wisdm-reports-for-learndash/includes/admin/class-admin-functions.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/admin-modal-learner-activity.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wisdm-reports-for-learndash/includes/templates/admin-notice-free-users.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: elearning, lms, dashboard, education, learndash reports...

wisdm-reports-for-learndash/learndash-reports-by-wisdmlabs.php 77% from 13 tests

The principal PHP file in "WISDM Reports For LearnDash" v. 1.8.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wisdm-reports-for-learndash.php" instead of "learndash-reports-by-wisdmlabs.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.2")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin358,606 lines of code in 433 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13537,61538,357283,167
CSS1256,9141,07050,332
PHP1191,8963,35318,218
Sass40878286,392
SVG1366487
JSON10010

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,217)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 154)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity60.50
▷ Minimum class complexity1.00
▷ Maximum class complexity1,217.00
Average method complexity7.17
▷ Minimum method complexity1.00
▷ Maximum method complexity154.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes44
▷ Abstract classes12.27%
▷ Concrete classes4397.73%
▷ Final classes00.00%
Methods382
▷ Static methods11229.32%
▷ Public methods35492.67%
▷ Protected methods225.76%
▷ Private methods61.57%
Functions59
▷ Named functions4881.36%
▷ Anonymous functions1118.64%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
93 PNG files occupy 6.21MB with 3.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/dashboard/assets/images/tabs/gutenberg/qs-tr.png144.82KB82.28KB▼ 43.18%
includes/admin/dashboard/assets/images/tabs/gutenberg/cr-ccr3.png94.99KB38.16KB▼ 59.83%
includes/admin/dashboard/assets/images/tabs/img_150p.png104.82KB44.56KB▼ 57.49%
includes/admin/dashboard/assets/images/request-feature-bg-moble.png5.07KB2.83KB▼ 44.20%
includes/admin/dashboard/assets/images/elumine.png44.61KB17.30KB▼ 61.21%