56% gamipress

Code Review | GamiPress - The #1 gamification plugin to reward points, achievements, badges & ranks in WordPress

WordPress plugin GamiPress - The #1 gamification plugin to reward points, achievements, badges & ranks in WordPress scored56%from 54 tests.

About plugin

  • Plugin page: gamipress
  • Plugin version: 6.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Nov 29, 2023
  • Number of updates: 435
  • Update frequency: every 5.4 days
  • Top authors: rubengc (93.79%)dioni00 (6.44%)

Code review

54 tests

User reviews

406 reviews

Install metrics

10,000+ active /1,002,205 total downloads

Benchmarks

Plugin footprint 63% 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: ▲9.11MB] [CPU: ▲54.86ms] 25% from 4 tests

Analyzing server-side resources used by GamiPress - The #1 gamification plugin to reward points, achievements, badges & ranks in WordPress
It is recommended to improve the following
  • RAM: You should keep total memory usage under 10MB (currently 12.19MB on /wp-admin/admin.php?page=edit_gamipress_user_earnings)
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,297.40ms on /wp-admin/admin.php?page=gamipress_licenses)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 9.11MB on /wp-admin/admin.php?page=edit_gamipress_user_earnings)
PageMemory (MB)CPU Time (ms)
Home /12.36 ▲8.9087.60 ▲40.01
Dashboard /wp-admin12.51 ▲9.20114.69 ▲64.14
Posts /wp-admin/edit.php12.55 ▲9.2096.68 ▲52.39
Add New Post /wp-admin/post-new.php15.70 ▲9.81162.79 ▲80.92
Media Library /wp-admin/upload.php12.38 ▲9.1595.44 ▲62.88
Edit Log /wp-admin/admin.php?page=edit_gamipress_logs12.4791.84
Help / Support /wp-admin/admin.php?page=gamipress_help_support12.3285.16
Logs /wp-admin/edit.php?post_type=gamipress-log12.2183.24
Achievement Types /wp-admin/edit.php?post_type=achievement-type12.42123.17
Licenses /wp-admin/admin.php?page=gamipress_licenses15.551,297.40
Add-ons /wp-admin/admin.php?page=gamipress_add_ons14.8697.55
Logs /wp-admin/admin.php?page=gamipress_logs12.3786.68
Points Types /wp-admin/edit.php?post_type=points-type12.4290.86
Rank Types /wp-admin/edit.php?post_type=rank-type12.4293.87
Edit User Earning /wp-admin/admin.php?page=edit_gamipress_user_earnings12.1976.45

Server storage [IO: ▲10.58MB] [DB: ▲0.41MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 1,374 new files
Database: 4 new tables, 32 new options
New tables
wp_gamipress_logs_meta
wp_gamipress_logs
wp_gamipress_user_earnings_meta
wp_gamipress_user_earnings
New WordPress options
widget_gamipress_inline_rank_widget
gamipress_version
widget_gamipress_rank_widget
widget_gamipress_youtube_widget
widget_gamipress_inline_achievement_widget
wpdb_gamipress_logs_meta_version
widget_gamipress_user_rank_widget
gamipress_settings
widget_gamipress_points_widget
gamipress_install_date
...

Browser metrics 75% from 4 tests

A check of browser resources used by GamiPress - The #1 gamification plugin to reward points, achievements, badges & ranks in WordPress
It is time to focus on the following
  • Nodes: Try to keep the DOM nodes under 25,000 (currently 25,232 on /wp-admin/admin.php?page=gamipress_add_ons)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,192 ▲43013.77 ▼0.6211.22 ▲8.7836.12 ▼8.08
Dashboard /wp-admin2,439 ▲2626.01 ▲0.38101.42 ▲6.3843.68 ▲1.53
Posts /wp-admin/edit.php2,257 ▲1572.32 ▲0.3838.09 ▼2.1333.62 ▼4.67
Add New Post /wp-admin/post-new.php1,655 ▲12922.91 ▼0.28616.08 ▲2.1336.45 ▼26.02
Media Library /wp-admin/upload.php1,560 ▲1574.48 ▲0.2998.17 ▲3.3142.28 ▲0.24
Edit Log /wp-admin/admin.php?page=edit_gamipress_logs1,2951.9331.3447.66
Help / Support /wp-admin/admin.php?page=gamipress_help_support4,4711.8431.3830.96
Logs /wp-admin/edit.php?post_type=gamipress-log280.410.073.54
Achievement Types /wp-admin/edit.php?post_type=achievement-type1,2592.2445.2439.39
Licenses /wp-admin/admin.php?page=gamipress_licenses9642.1832.4926.55
Add-ons /wp-admin/admin.php?page=gamipress_add_ons25,2322.4446.9572.46
Logs /wp-admin/admin.php?page=gamipress_logs1,2951.9229.6635.54
Points Types /wp-admin/edit.php?post_type=points-type1,2692.2839.7850.66
Rank Types /wp-admin/edit.php?post_type=rank-type1,2592.2237.6835.60
Edit User Earning /wp-admin/admin.php?page=edit_gamipress_user_earnings1,2261.9131.5130.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • wp_gamipress_logs_meta
    • wp_gamipress_logs
    • wp_gamipress_user_earnings
    • wp_gamipress_user_earnings_meta
  • Zombie WordPress options were found after uninstall: 32 options
    • widget_gamipress_achievements_widget
    • theysaidso_admin_options
    • widget_gamipress_inline_user_rank_widget
    • widget_gamipress_earnings_widget
    • wpdb_gamipress_logs_meta_version
    • widget_gamipress_email_settings_widget
    • widget_theysaidso_widget
    • widget_gamipress_points_types_widget
    • widget_gamipress_rank_widget
    • gamipress_install_date
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_gamipress_user_earnings
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 59 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gamipress_help_support
    • > Notice in wp-includes/class-wp-list-util.php+170
    Undefined index: default

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gamipress/templates/inline-ranks.php
    • > /wp-content/plugins/gamipress/templates/inline-achievements.php
  • 159× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/gamipress/libraries/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/gamipress/libraries/ct/init.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress/integrations/armember/armember.php:170
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress/integrations/fluentform/fluentform.php:166
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/gamipress/libraries/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress/integrations/modern-events-calendar/modern-events-calendar.php:131
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/gamipress/includes/api/class-wp-rest-gamipress-posts-controller.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress/integrations/restrict-content-pro/restrict-content-pro.php:158
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress/integrations/woocommerce-shipstation/woocommerce-shipstation.php:161
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Radio' not found in wp-content/plugins/gamipress/libraries/cmb2/includes/types/CMB2_Type_Taxonomy_Radio_Hierarchical.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=gamipress-log
    • > Network (severe)
    wp-admin/edit.php?post_type=gamipress-log - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

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 to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

gamipress/gamipress.php Passed 13 tests

"GamiPress - The #1 gamification plugin to reward points, achievements, badges & ranks in WordPress" version 6.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
The most flexible and powerful gamification system for WordPress.

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
No dangerous file extensions were detected150,591 lines of code in 1,196 files:
LanguageFilesBlank linesComment linesLines of code
PHP80029,28954,47475,692
PO File12014,31518,50232,323
JavaScript1896,1942,97622,722
CSS411,0091,3528,193
JSON3006,619
SVG18992,554
Sass17306291,411
Markdown838101,077

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity16.75
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes202
▷ Abstract classes94.46%
▷ Concrete classes19395.54%
▷ Final classes8544.04%
Methods1,429
▷ Static methods18212.74%
▷ Public methods94165.85%
▷ Protected methods1107.70%
▷ Private methods37826.45%
Functions2,696
▷ Named functions2,69499.93%
▷ Anonymous functions20.07%
Constants296
▷ Global constants28796.96%
▷ Class constants93.04%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
libraries/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
libraries/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
libraries/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
libraries/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%