78% grid-button-for-learndash

Code Review | Grid Button for LearnDash

WordPress plugin Grid Button for LearnDash scored78%from 54 tests.

About plugin

  • Plugin page: grid-button-for-l...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Jul 1, 2021
  • Latest release: Aug 5, 2021
  • Number of updates: 7
  • Update frequency: every 5.0 days
  • Top authors: maurolopes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,327 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.00MB] [CPU: ▼5.25ms] Passed 4 tests

An overview of server-side resources used by Grid Button for LearnDash
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.44 ▼1.55
Dashboard /wp-admin3.31 ▲0.0045.44 ▲0.68
Posts /wp-admin/edit.php3.36 ▲0.0046.51 ▲0.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.96 ▼17.37
Media Library /wp-admin/upload.php3.23 ▲0.0030.48 ▼2.46
Grid Button /wp-admin/admin.php?page=learndash-trgb-grid-button3.0022.29

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Grid Button for LearnDash: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.361.82 ▲0.0143.16 ▲1.35
Dashboard /wp-admin2,206 ▲185.91 ▲1.03106.67 ▲6.2238.50 ▼5.83
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0039.44 ▲2.1435.78 ▼0.47
Add New Post /wp-admin/post-new.php1,514 ▼1917.56 ▼5.37634.39 ▲26.3961.64 ▲0.92
Media Library /wp-admin/upload.php1,379 ▼124.20 ▲0.0297.45 ▼4.3343.87 ▼0.33
Grid Button /wp-admin/admin.php?page=learndash-trgb-grid-button280.440.123.70

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grid-button-for-learndash/admin/trgb-settings.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=learndash-trgb-grid-button
    • > Network (severe)
    wp-admin/admin.php?page=learndash-trgb-grid-button - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: elearning, lms, learndash, education, learning

grid-button-for-learndash/learndash-grid-button.php 77% from 13 tests

The main PHP file in "Grid Button for LearnDash" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("grid-button-for-learndash.php" instead of "learndash-grid-button.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin1,225 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP310922889
CSS2371256
JavaScript19680

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin