83% badgeos-lifterlms-integration

Code Review | LifterLMS BadgeOS Integration

WordPress plugin LifterLMS BadgeOS Integration scored83%from 54 tests.

About plugin

  • Plugin page: badgeos-lifterlms...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2020
  • Latest release: Feb 28, 2022
  • Number of updates: 5
  • Update frequency: every 109.8 days
  • Top authors: learningtimes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by LifterLMS BadgeOS Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.52 ▲0.20
Dashboard /wp-admin3.31 ▼0.0442.79 ▼26.02
Posts /wp-admin/edit.php3.36 ▲0.0043.86 ▲0.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.01 ▲3.64
Media Library /wp-admin/upload.php3.23 ▲0.0031.47 ▼5.90

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
lifterlms_bos_options
widget_theysaidso_widget
can_compress_scripts
lifterlms_bos_version
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by LifterLMS BadgeOS Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.14 ▼1.244.57 ▲2.6743.04 ▼0.38
Dashboard /wp-admin2,209 ▲184.85 ▼0.0798.14 ▼6.5938.92 ▼8.01
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0434.58 ▼0.5934.50 ▼1.75
Add New Post /wp-admin/post-new.php1,544 ▲3018.44 ▲0.85603.16 ▼61.3455.75 ▲0.47
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.1295.92 ▼1.2543.55 ▼2.52

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 detected upon uninstall: 8 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • lifterlms_bos_version
    • db_upgraded
    • lifterlms_bos_options
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× 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-lifterlms-integration/includes/integration/rules-engine.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/badgeos-lifterlms-integration/includes/integration/steps-ui.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: lms, lifterlms, lifterlms lessons, lifterlms course, badgeos...

badgeos-lifterlms-integration/lifterlms-badgeos.php 77% from 13 tests

Analyzing the main PHP file in "LifterLMS BadgeOS Integration" version 1.1.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("badgeos-lifterlms-integration.php" instead of "lifterlms-badgeos.php")
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,397 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP74377181,229
CSS210103
Markdown221039
JavaScript28326

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods420.00%
▷ Public methods1785.00%
▷ Protected methods00.00%
▷ Private methods315.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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