83% badgeos-learndash-add-on

Code Review | BadgeOS LearnDash Add-on

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

About plugin

  • Plugin page: badgeos-learndash...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 25, 2013
  • Latest release: Feb 17, 2022
  • Number of updates: 21
  • Update frequency: every 146.1 days
  • Top authors: credly (47.62%)learningtimes (42.86%)tw2113 (19.05%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /48,277 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.48ms] 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 /3.46 ▲0.0040.07 ▲3.21
Dashboard /wp-admin3.31 ▼0.0453.60 ▼6.00
Posts /wp-admin/edit.php3.36 ▲0.0043.75 ▼4.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.79 ▼6.73
Media Library /wp-admin/upload.php3.23 ▲0.0033.46 ▼0.70

Server storage [IO: ▲0.19MB] [DB: ▲0.31MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

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 /2,804 ▲4314.40 ▲0.121.83 ▲0.2542.07 ▲0.91
Dashboard /wp-admin2,189 ▲225.54 ▼0.1281.13 ▼15.2939.02 ▼2.24
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0035.07 ▼1.6632.41 ▲0.27
Add New Post /wp-admin/post-new.php1,526 ▼223.76 ▲0.68630.57 ▼44.9854.25 ▼7.65
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.07100.85 ▲6.4544.64 ▼0.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
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 plugin_basename() in wp-content/plugins/badgeos-learndash-add-on/badgeos-learndash.php:57
    • > 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 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 86% from 29 tests

readme.txt 81% 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:
  • Requires at least: Version not formatted correctly
  • 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.5'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,153 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP55678672,028
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%
Functions21
▷ Named functions21100.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