83% grassblade-xapi-lifterlms

Code Review | Experience API for LifterLMS by Grassblade

WordPress plugin Experience API for LifterLMS by Grassblade scored83%from 54 tests.

About plugin

  • Plugin page: grassblade-xapi-l...
  • Plugin version: 2.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2020
  • Latest release: Jun 5, 2023
  • Number of updates: 27
  • Update frequency: every 43.2 days
  • Top authors: liveaspankaj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,600 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼7.64ms] 75% from 4 tests

Analyzing server-side resources used by Experience API for LifterLMS by Grassblade
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 3,880.09ms on /wp-admin/admin.php?page=grassblade-addons)
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3840.86 ▲1.76
Dashboard /wp-admin3.75 ▲0.4149.55 ▼17.15
Posts /wp-admin/edit.php3.80 ▲0.4549.51 ▲3.57
Add New Post /wp-admin/post-new.php6.27 ▲0.3988.12 ▼18.06
Media Library /wp-admin/upload.php3.61 ▲0.3938.90 ▲2.89
Add-ons /wp-admin/admin.php?page=grassblade-addons3.863,880.09
LifterLMS /wp-admin/admin.php?page=grassblade-xapi-lifterlms3.6332.75
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings3.6331.03

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
grassblade_addons
db_upgraded
grassblade_free_addons
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Experience API for LifterLMS by Grassblade
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.25 ▼1.051.53 ▼0.3241.92 ▲2.32
Dashboard /wp-admin2,246 ▲584.93 ▼0.9296.13 ▼15.2488.42 ▲46.15
Posts /wp-admin/edit.php2,129 ▲402.02 ▼0.0234.55 ▼3.0637.92 ▲3.42
Add New Post /wp-admin/post-new.php1,702 ▲18822.55 ▲5.11660.08 ▼49.8844.82 ▼9.44
Media Library /wp-admin/upload.php1,419 ▲314.20 ▼0.01103.33 ▼13.2170.91 ▲20.17
Add-ons /wp-admin/admin.php?page=grassblade-addons2,8232.1933.9269.96
LifterLMS /wp-admin/admin.php?page=grassblade-xapi-lifterlms9022.0124.1035.28
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings9152.0122.7328.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • grassblade_free_addons
    • widget_recent-posts
    • grassblade_addons
    • theysaidso_admin_options

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
Everything seems fine, however 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/grassblade-xapi-lifterlms/functions.php on line 32
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/grassblade-xapi-lifterlms/functions.php on line 32
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/grassblade-xapi-lifterlms/functions.php on line 32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

grassblade-xapi-lifterlms/functions.php 92% from 13 tests

Analyzing the main PHP file in "Experience API for LifterLMS by Grassblade" version 2.8
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("grassblade-xapi-lifterlms.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,904 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44571311,865
JavaScript114139

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity140.67
▷ Minimum class complexity26.00
▷ Maximum class complexity280.00
Average method complexity6.05
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods83
▷ Static methods1720.48%
▷ Public methods83100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon-gb.png3.43KB0.84KB▼ 75.48%
img/gb_logo.png3.43KB0.84KB▼ 75.48%
img/no.png1.01KB0.62KB▼ 39.05%
img/icon_30x30.png4.58KB1.60KB▼ 65.15%
img/icon_128x128.png22.67KB6.87KB▼ 69.71%