84% gamipress-learndash-group-leaderboard

Code Review | GamiPress - LearnDash Group Leaderboard

WordPress plugin GamiPress - LearnDash Group Leaderboard scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-learnda...
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 19, 2018
  • Latest release: Sep 4, 2023
  • Number of updates: 27
  • Update frequency: every 63.7 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /9,231 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
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.28ms] Passed 4 tests

Server-side resources used by GamiPress - LearnDash Group Leaderboard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.45 ▲3.31
Dashboard /wp-admin3.31 ▼0.0343.51 ▼20.29
Posts /wp-admin/edit.php3.36 ▲0.0141.88 ▼0.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.88 ▼7.03
Media Library /wp-admin/upload.php3.23 ▲0.0131.83 ▼0.98

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

GamiPress - LearnDash Group Leaderboard: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.36 ▼1.025.78 ▲4.0643.63 ▲0.73
Dashboard /wp-admin2,226 ▲385.84 ▲0.9798.64 ▼12.5839.75 ▼3.74
Posts /wp-admin/edit.php2,112 ▲202.00 ▲0.0434.97 ▼1.9534.98 ▲2.49
Add New Post /wp-admin/post-new.php1,551 ▲3223.24 ▲0.20616.80 ▼35.7055.87 ▲9.34
Media Library /wp-admin/upload.php1,414 ▲294.22 ▲0.0095.94 ▼14.1343.10 ▼6.14

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-learndash-group-leaderboard/gamipress-learndash-group-leaderboard.php:264

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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
You can look at the official readme.txt

gamipress-learndash-group-leaderboard/gamipress-learndash-group-leaderboard.php Passed 13 tests

Analyzing the main PHP file in "GamiPress - LearnDash Group Leaderboard" version 1.1.4
72 characters long description:
Automatically create a GamiPress leaderboard of LearnDash group members.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected854 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP12200338589
JavaScript64721217
CSS28248

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.00
▷ Minimum class complexity8.00
▷ Maximum class complexity20.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods12
▷ Static methods325.00%
▷ Public methods866.67%
▷ Protected methods00.00%
▷ Private methods433.33%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin