84% xtras-learndash

Code Review | Xtras LearnDash

WordPress plugin Xtras LearnDash scored84%from 54 tests.

About plugin

  • Plugin page: xtras-learndash
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2016
  • Latest release: Nov 22, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ernestortiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.72ms] Passed 4 tests

Server-side resources used by Xtras LearnDash
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.58 ▲6.66
Dashboard /wp-admin3.31 ▲0.0044.21 ▼5.68
Posts /wp-admin/edit.php3.36 ▲0.0042.14 ▼3.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.28 ▼4.51
Media Library /wp-admin/upload.php3.23 ▲0.0033.67 ▼1.58

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Xtras LearnDash
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲14313.62 ▼0.657.75 ▲5.6745.06 ▲2.16
Dashboard /wp-admin2,200 ▲125.83 ▲0.93101.41 ▼17.0038.63 ▼7.03
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0436.62 ▼2.5730.53 ▼3.44
Add New Post /wp-admin/post-new.php1,533 ▼423.20 ▼0.06673.14 ▲6.8755.51 ▲8.06
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0498.14 ▲0.7845.19 ▲0.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/xtras-learndash/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xtras-learndash/xtraslms.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: courses, lms, learning, learndash

xtras-learndash/xtraslms.php 92% from 13 tests

The main PHP script in "Xtras LearnDash" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xtras-learndash.php" instead of "xtraslms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected331 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP22270248
CSS11345
JavaScript442138

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin