74% better-learndash-api

Code Review | Better LearnDash API

WordPress plugin Better LearnDash API scored74%from 54 tests.

About plugin

  • Plugin page: better-learndash-api
  • Plugin version: 0.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: May 20, 2017
  • Latest release: Mar 29, 2023
  • Number of updates: 20
  • Update frequency: every 107.0 days
  • Top authors: rickonline_nl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,608 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.97ms] Passed 4 tests

An overview of server-side resources used by Better LearnDash API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.49 ▲1.87
Dashboard /wp-admin3.41 ▲0.1147.81 ▲0.02
Posts /wp-admin/edit.php3.52 ▲0.1746.58 ▼2.53
Add New Post /wp-admin/post-new.php5.99 ▲0.1079.68 ▼3.24
Media Library /wp-admin/upload.php3.33 ▲0.1138.18 ▲2.02
Better LearnDash API /wp-admin/options-general.php?page=blda_admin_page3.2834.20

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: 1 new table, 8 new options
New tables
wp_blda_log
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
blda_version
blda_options_api_key

Browser metrics Passed 4 tests

Better LearnDash API: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.78 ▲0.401.79 ▼0.1043.17 ▼7.62
Dashboard /wp-admin2,213 ▲254.88 ▼0.97111.53 ▲1.7442.87 ▲1.24
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0135.40 ▼4.1034.56 ▼1.23
Add New Post /wp-admin/post-new.php1,537 ▲323.43 ▲0.37667.62 ▲5.6653.32 ▼1.01
Media Library /wp-admin/upload.php1,392 ▲44.13 ▼0.05109.12 ▲10.7451.87 ▲8.89
Better LearnDash API /wp-admin/options-general.php?page=blda_admin_page1,0272.1724.7328.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_blda_log
  • The uninstall procedure has failed, leaving 8 options in the database
    • blda_options_api_key
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • blda_version
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× 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/better-learndash-api/better-learndash-api.php:73

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

better-learndash-api/better-learndash-api.php 92% from 13 tests

The main file in "Better LearnDash API" v. 0.5.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 172 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
There were no executable files found in this plugin697 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1250161663
CSS16134

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png99.20KB33.25KB▼ 66.48%
img/Logo-Ram.png21.91KB8.29KB▼ 62.15%
assets/screenshot-2.png53.25KB18.10KB▼ 66.02%
assets/screenshot-3.png20.00KB7.78KB▼ 61.13%