84% gamipress-block-users

Code Review | GamiPress - Block Users

WordPress plugin GamiPress - Block Users scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-block-u...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2018
  • Latest release: Sep 4, 2023
  • Number of updates: 22
  • Update frequency: every 89.1 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /7,054 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.89ms] Passed 4 tests

An overview of server-side resources used by GamiPress - Block Users
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.86 ▼0.27
Dashboard /wp-admin3.33 ▲0.0248.82 ▼2.24
Posts /wp-admin/edit.php3.38 ▲0.0246.25 ▼1.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.07 ▼8.57
Media Library /wp-admin/upload.php3.25 ▲0.0233.21 ▼2.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

GamiPress - Block Users: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲6013.63 ▼0.661.66 ▼0.9145.96 ▼4.37
Dashboard /wp-admin2,223 ▲355.86 ▼0.0495.60 ▼18.3238.18 ▼8.80
Posts /wp-admin/edit.php2,106 ▲172.01 ▼0.0036.87 ▼0.8431.45 ▼5.17
Add New Post /wp-admin/post-new.php1,546 ▲3223.35 ▲5.83666.09 ▼11.0260.46 ▼5.53
Media Library /wp-admin/upload.php1,402 ▲114.25 ▲0.0496.57 ▼2.6741.03 ▼7.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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 | 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-block-users/gamipress-block-users.php:200

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

gamipress-block-users/gamipress-block-users.php Passed 13 tests

The main PHP file in "GamiPress - Block Users" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
79 characters long description:
Block users and roles from getting awarded through the GamiPress awards engine.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin189 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP470172156
JavaScript23233

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin