93% badgeos-learndash-add-on

Code Review | BadgeOS LearnDash Add-on

WordPress plugin BadgeOS LearnDash Add-on scored 93% from 54 tests.

About plugin

  • Plugin page: badgeos-learndash...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 5.8.1
  • First release: Sep 25, 2013
  • Latest release: Sep 6, 2021
  • Number of updates: 19
  • Update frequency: every 152.8 days
  • Top authors: credly (52.63%)learningtimes (36.84%)tw2113 (21.05%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 40,819 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

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

This is a short check of server-side resources used by BadgeOS LearnDash Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1245.04 ▲16.66
Dashboard /wp-admin3.06 ▲0.0049.53 ▲9.59
Posts /wp-admin/edit.php3.11 ▲0.0055.51 ▲7.13
Add New Post /wp-admin/post-new.php5.42 ▼0.02109.73 ▼552.77
Media Library /wp-admin/upload.php3.00 ▲0.0031.96 ▼1.84

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BadgeOS LearnDash Add-on
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲12915.92 ▼0.0210.87 ▼4.3547.97 ▼1.61
Dashboard /wp-admin2,992 ▲586.17 ▲0.01159.44 ▲8.49116.44 ▲11.53
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0180.65 ▲12.71122.55 ▲28.77
Add New Post /wp-admin/post-new.php1,683 ▲6818.65 ▼2.74409.34 ▲100.75111.50 ▲3.69
Media Library /wp-admin/upload.php1,810 ▲35.03 ▲0.03162.40 ▼3.59119.42 ▼2.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-learndash-add-on/includes/rules-engine.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/badgeos-learndash-add-on/badgeos-learndash.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/badgeos-learndash-add-on/includes/steps-ui.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #4, #5, #6, #7 in badgeos-learndash-add-on/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

badgeos-learndash-add-on/badgeos-learndash.php 92% from 13 tests

"BadgeOS LearnDash Add-on" version 1.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("badgeos-learndash-add-on.php" instead of "badgeos-learndash.php")

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 detected2,131 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP55668662,006
PO File13838105
JavaScript11116
CSS1113
Markdown1101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity16.00
▷ Minimum class complexity9.00
▷ Maximum class complexity23.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin