84% custom-template-learndash

Code Review | Custom Template for LearnDash

WordPress plugin Custom Template for LearnDash scored84%from 54 tests.

About plugin

  • Plugin page: custom-template-l...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Mar 5, 2018
  • Latest release: Aug 21, 2023
  • Number of updates: 21
  • Update frequency: every 95.2 days
  • Top authors: brainstormworg (57.14%)Nikschavan (47.62%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /29,535 total downloads

Benchmarks

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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.30ms] Passed 4 tests

An overview of server-side resources used by Custom Template for LearnDash
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.55 ▼5.30
Dashboard /wp-admin3.31 ▲0.0143.59 ▼0.66
Posts /wp-admin/edit.php3.36 ▲0.0144.49 ▼2.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.94 ▼12.80
Media Library /wp-admin/upload.php3.24 ▲0.0134.48 ▲1.68

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
ctlearndash_activation
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Template for LearnDash
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.081.71 ▲0.1739.95 ▲0.67
Dashboard /wp-admin2,203 ▲145.84 ▲0.8897.16 ▼21.6939.32 ▼4.78
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0434.01 ▼4.8531.48 ▼4.58
Add New Post /wp-admin/post-new.php1,529 ▲1523.30 ▼0.24682.13 ▲12.0657.33 ▲6.18
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.1094.01 ▼4.9141.20 ▼3.22

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • ctlearndash_activation
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-template-learndash/custom-template-learndash.php:16

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: liftlms, page-buider, visual composer, beaver builder, course...

custom-template-learndash/custom-template-learndash.php 92% from 13 tests

The main file in "Custom Template for LearnDash" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 190 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
Everything looks great! No dangerous files found in this plugin459 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4145259451
JSON1008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity26.00
▷ Minimum class complexity3.00
▷ Maximum class complexity59.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods722.58%
▷ Public methods2890.32%
▷ Protected methods00.00%
▷ Private methods39.68%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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 images were found in this plugin