72% participants-database

Code Review | Participants Database

WordPress plugin Participants Database scored72%from 54 tests.

About plugin

  • Plugin page: participants-data...
  • Plugin version: 2.5.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2012
  • Latest release: Nov 25, 2023
  • Number of updates: 1,576
  • Update frequency: every 2.8 days
  • Top authors: xnau (100%)

Code review

54 tests

User reviews

313 reviews

Install metrics

10,000+ active /1,166,076 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▲7.95ms] Passed 4 tests

Analyzing server-side resources used by Participants Database
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4841.50 ▲2.23
Dashboard /wp-admin3.84 ▲0.5454.73 ▲4.19
Posts /wp-admin/edit.php3.89 ▲0.5460.85 ▲13.40
Add New Post /wp-admin/post-new.php6.38 ▲0.49100.63 ▲20.81
Media Library /wp-admin/upload.php3.70 ▲0.4745.25 ▲11.98
List Participants /wp-admin/admin.php?page=participants-database4.2965.25
Setup Guide /wp-admin/admin.php?page=participants-database-setup_guide3.7140.94
Add Participant /wp-admin/admin.php?page=participants-database-add_participant3.8139.24
Manage Database Fields /wp-admin/admin.php?page=participants-database-manage_fields4.08147.76
/wp-admin/admin.php?page=participants-database-edit_participant3.8143.66
Import CSV File /wp-admin/admin.php?page=participants-database-upload_csv3.8351.19
Settings /wp-admin/admin.php?page=participants-database_settings_page4.21326.29
Debugging Log /wp-admin/admin.php?page=participants-database-pdb_debugging3.6942.51
Manage List Columns /wp-admin/admin.php?page=participants-database-manage_list_columns3.7142.72

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 303 new files
Database: 3 new tables, 15 new options
New tables
wp_participants_database_fields
wp_participants_database
wp_participants_database_groups
New WordPress options
widget_theysaidso_widget
pdb-option_version
can_compress_scripts
widget_recent-comments
pdb_admin_notices
widget_recent-posts
pdb-admin_list_filter-1
participants-database_options
pdb_debugging-settings
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Participants Database
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12014.30 ▼0.281.68 ▲0.0846.69 ▲3.61
Dashboard /wp-admin2,265 ▲885.63 ▲0.0987.21 ▼20.0839.58 ▼5.54
Posts /wp-admin/edit.php2,167 ▲672.01 ▲0.0540.16 ▼1.4833.87 ▼4.19
Add New Post /wp-admin/post-new.php1,581 ▲5523.27 ▲0.21624.89 ▼86.1349.98 ▼5.56
Media Library /wp-admin/upload.php1,470 ▲734.31 ▲0.1295.29 ▼6.4942.91 ▼2.33
List Participants /wp-admin/admin.php?page=participants-database1,7392.6172.5052.67
Setup Guide /wp-admin/admin.php?page=participants-database-setup_guide1,0022.1239.8435.48
Add Participant /wp-admin/admin.php?page=participants-database-add_participant1,6153.4957.3144.92
Manage Database Fields /wp-admin/admin.php?page=participants-database-manage_fields8,0494.2295.9564.33
/wp-admin/admin.php?page=participants-database-edit_participant1,6143.4648.3038.24
Import CSV File /wp-admin/admin.php?page=participants-database-upload_csv1,2832.2328.5930.29
Settings /wp-admin/admin.php?page=participants-database_settings_page4,4009.42302.3894.27
Debugging Log /wp-admin/admin.php?page=participants-database-pdb_debugging9672.2841.4531.20
Manage List Columns /wp-admin/admin.php?page=participants-database-manage_list_columns1,0942.6642.8030.80

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: 8 options
    • can_compress_scripts
    • theysaidso_admin_options
    • pdb-option_version
    • widget_theysaidso_widget
    • pdb-admin_list_filter-1
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% 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
  • 48 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=participants-database-edit_participant
    • > Notice in wp-content/plugins/participants-database/edit_participant.php+144
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/participants-database/classes/PDb_File_Uploads.php
  • 41× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/participants-database/templates/pdb-list-flexbox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/participants-database/manage_fields_help.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PDb_fields\\calculated_field' not found in wp-content/plugins/participants-database/classes/PDb_fields/numeric_calc.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PDb_submission\\rest_api\\post_request' not found in wp-content/plugins/participants-database/classes/PDb_submission/rest_api/post/update_record.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/participants-database/vendor/deliciousbrains/wp-background-processing/wp-background-processing.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ParseCsv\\enums\\AbstractEnum' not found in wp-content/plugins/participants-database/vendor/parsecsv/php-parsecsv/src/enums/SortEnum.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PDb_submission\\rest_api\\request' not found in wp-content/plugins/participants-database/classes/PDb_submission/rest_api/head/query_record.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/participants-database/templates/pdb-search-default.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ParseCsv\\enums\\AbstractEnum' not found in wp-content/plugins/participants-database/vendor/parsecsv/php-parsecsv/src/enums/DatatypeEnum.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/participants-database/templates/pdb-thanks-default.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Screenshots: These screenshots do not have images: #1 (Managing Database fields: this is where you set up your database fields and all attributes for each field), #2 (Edit Record: this is where an individual record can be created or edited), #3 (Import CSV File: page where CSV files can be imported, includes detailed instructions and a blank spreadsheet download)
You can look at the official readme.txt

participants-database/participants-database.php Passed 13 tests

The principal PHP file in "Participants Database" v. 2.5.6 is loaded by WordPress automatically on each request
69 characters long description:
Plugin for managing a database of participants, members or volunteers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected77,658 lines of code in 250 files:
LanguageFilesBlank linesComment linesLines of code
PO File2415,27122,28844,936
PHP1698,24820,26927,727
CSS111061212,304
JavaScript32742121,774
Markdown41610406
JSON500283
HTML3180190
YAML11037
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity30.98
▷ Minimum class complexity1.00
▷ Maximum class complexity258.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces16
Interfaces0
Traits3
Classes136
▷ Abstract classes1712.50%
▷ Concrete classes11987.50%
▷ Final classes00.00%
Methods2,097
▷ Static methods55626.51%
▷ Public methods1,20357.37%
▷ Protected methods43120.55%
▷ Private methods46322.08%
Functions59
▷ Named functions46.78%
▷ Anonymous functions5593.22%
Constants69
▷ Global constants45.80%
▷ Class constants6594.20%
▷ Public constants65100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/jquery-ui-theme/images/ui-bg_glass_35_dddddd_1x400.png0.26KB0.13KB▼ 49.24%
ui/no-image.png3.66KB3.58KB▼ 2.19%
css/jquery-ui-theme/images/ui-icons_70b2e1_256x240.png4.44KB4.17KB▼ 6.02%
css/jquery-ui-theme/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
css/jquery-ui-theme/images/ui-bg_glass_60_eeeeee_1x400.png0.26KB0.12KB▼ 51.53%