84% gamipress-leaderboards-include-exclude-users

Code Review | GamiPress - Leaderboards Include/Exclude Users

WordPress plugin GamiPress - Leaderboards Include/Exclude Users scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-leaderb...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jan 25, 2019
  • Latest release: Sep 4, 2023
  • Number of updates: 24
  • Update frequency: every 70.1 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /10,436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.94ms] Passed 4 tests

A check of server-side resources used by GamiPress - Leaderboards Include/Exclude Users
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.69 ▲2.73
Dashboard /wp-admin3.34 ▲0.0344.09 ▼3.49
Posts /wp-admin/edit.php3.39 ▲0.0346.94 ▼3.04
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.13 ▼8.23
Media Library /wp-admin/upload.php3.26 ▲0.0331.66 ▼0.99

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

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

Browser metrics Passed 4 tests

GamiPress - Leaderboards Include/Exclude Users: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8513.26 ▼1.121.71 ▲0.1145.65 ▲2.96
Dashboard /wp-admin2,226 ▲435.82 ▼0.0898.19 ▼14.3938.36 ▼2.18
Posts /wp-admin/edit.php2,109 ▲202.02 ▲0.0340.95 ▲4.1136.12 ▲3.55
Add New Post /wp-admin/post-new.php1,557 ▲2318.47 ▼4.72632.32 ▼67.3955.32 ▲0.27
Media Library /wp-admin/upload.php1,408 ▲204.23 ▲0.03102.60 ▼6.5641.73 ▼6.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-leaderboards-include-exclude-users/gamipress-leaderboards-include-exclude-users.php:236

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 97% 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:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

gamipress-leaderboards-include-exclude-users/gamipress-leaderboards-include-exclude-users.php Passed 13 tests

The main PHP script in "GamiPress - Leaderboards Include/Exclude Users" version 1.0.8 is automatically included on every request by WordPress
62 characters long description:
Include or exclude specific users or roles on any leaderboard.

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
Everything looks great! No dangerous files found in this plugin275 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4102168231
JavaScript28444

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions7
▷ Named functions7100.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 were not PNG files found in your plugin