84% widget-areas-learndash

Code Review | Widget Areas for LearnDash

WordPress plugin Widget Areas for LearnDash scored84%from 54 tests.

About plugin

  • Plugin page: widget-areas-lear...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: Jan 24, 2022
  • Number of updates: 13
  • Update frequency: every 59.1 days
  • Top authors: escapecreative (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /7,793 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Widget Areas for LearnDash
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.42 ▼6.10
Dashboard /wp-admin3.33 ▲0.0244.43 ▼6.83
Posts /wp-admin/edit.php3.38 ▲0.0245.38 ▲1.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.18 ▼6.72
Media Library /wp-admin/upload.php3.25 ▲0.0234.54 ▲2.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget Areas for LearnDash
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.17 ▼1.121.88 ▼0.6040.21 ▼2.12
Dashboard /wp-admin2,206 ▲184.85 ▼0.07112.43 ▼3.7239.43 ▼6.67
Posts /wp-admin/edit.php2,089 ▼02.15 ▲0.1436.60 ▼1.0334.33 ▼3.96
Add New Post /wp-admin/post-new.php1,542 ▼123.05 ▲4.91659.69 ▲49.2951.37 ▼11.98
Media Library /wp-admin/upload.php1,388 ▲34.26 ▲0.0296.16 ▼5.3143.97 ▲0.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-areas-learndash/inc/action-hooks.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-areas-learndash/inc/register-sidebars.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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: learning management system, learndash, lms, widgets, sidebars...

widget-areas-learndash/widget-areas-learndash.php 92% from 13 tests

"Widget Areas for LearnDash" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 193 characters long)

Code Analysis Passed 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
No dangerous file extensions were detected166 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP467100166

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected