83% gamipress-reset-user

Code Review | GamiPress - Reset User

WordPress plugin GamiPress - Reset User scored83%from 54 tests.

About plugin

  • Plugin page: gamipress-reset-user
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: May 15, 2020
  • Latest release: Sep 4, 2023
  • Number of updates: 12
  • Update frequency: every 100.7 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,914 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by GamiPress - Reset User
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.62 ▼6.91
Dashboard /wp-admin3.33 ▲0.0245.65 ▼0.43
Posts /wp-admin/edit.php3.38 ▲0.0245.88 ▲2.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.76 ▼6.94
Media Library /wp-admin/upload.php3.25 ▲0.0236.72 ▲1.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for GamiPress - Reset User
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.54 ▲0.281.64 ▲0.0541.63 ▲3.11
Dashboard /wp-admin2,212 ▲415.58 ▼0.0581.92 ▼7.9637.84 ▼8.77
Posts /wp-admin/edit.php2,121 ▲212.02 ▲0.0334.93 ▼1.7734.56 ▼2.16
Add New Post /wp-admin/post-new.php1,538 ▲1223.28 ▼0.52664.57 ▲8.8152.68 ▼0.86
Media Library /wp-admin/upload.php1,414 ▲174.25 ▲0.05111.80 ▲10.6648.64 ▲5.39

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

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 | 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 fix the following items
  • 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-reset-user/gamipress-reset-users.php:198

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

gamipress-reset-user/gamipress-reset-users.php 85% from 13 tests

This is the main PHP file of "GamiPress - Reset User" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gamipress-reset-user.php" instead of "gamipress-reset-users.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin120 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP258117120

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin