83% hct-community-database-management

Code Review | HCT Community Database Management

WordPress plugin HCT Community Database Management scored 83% from 54 tests.

About plugin

  • Plugin page: hct-community-dat...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Dec 4, 2022
  • Number of updates: 15
  • Update frequency: every 136.5 days
  • Top authors: harishtripathi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 691 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by HCT Community Database Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.70 ▼7.88
Dashboard /wp-admin3.34 ▲0.0346.34 ▲0.73
Posts /wp-admin/edit.php3.39 ▲0.0345.68 ▲2.10
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.75 ▲6.98
Media Library /wp-admin/upload.php3.26 ▲0.0333.27 ▲0.77
Add New Member /wp-admin/admin.php?page=hctdd_add_dd3.3433.04
Charts /wp-admin/admin.php?page=hctdd_charts_dd3.2433.35
Community Database /wp-admin/admin.php?page=hctdd_menu3.2531.82
Import CSV Data /wp-admin/admin.php?page=hctdd_import_dd3.2430.81
Export CSV Data /wp-admin/admin.php?page=hctdd_export_dd3.2332.45

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 7 new options
New tables
wp_community_database
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
hctdd_db_version
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

HCT Community Database Management: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.74 ▼0.611.71 ▼0.2739.82 ▼1.31
Dashboard /wp-admin2,248 ▲605.16 ▲0.2597.68 ▼8.1941.83 ▼3.59
Posts /wp-admin/edit.php2,131 ▲422.32 ▲0.2839.47 ▲1.6037.09 ▲4.27
Add New Post /wp-admin/post-new.php1,549 ▲3523.71 ▲6.19665.09 ▼28.5461.06 ▼7.40
Media Library /wp-admin/upload.php1,430 ▲394.32 ▲0.1094.63 ▼18.8641.06 ▼9.81
Add New Member /wp-admin/admin.php?page=hctdd_add_dd1,0961.9025.5624.71
Charts /wp-admin/admin.php?page=hctdd_charts_dd9084.2664.2941.56
Community Database /wp-admin/admin.php?page=hctdd_menu1,0021.9225.0629.28
Import CSV Data /wp-admin/admin.php?page=hctdd_import_dd8251.8824.6126.46
Export CSV Data /wp-admin/admin.php?page=hctdd_export_dd8792.0525.3923.82

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hct-community-database-management/hct_community_database.php
    • > /wp-content/plugins/hct-community-database-management/hct_dd_add.php
    • > /wp-content/plugins/hct-community-database-management/hct_dd_export.php
    • > /wp-content/plugins/hct-community-database-management/hct_dd_list.php
    • > /wp-content/plugins/hct-community-database-management/hct_dd_charts.php
    • > /wp-content/plugins/hct-community-database-management/hct_dd_import.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === hct-community-database-management === )
You can look at the official readme.txt

hct-community-database-management/hct_community_database.php 77% from 13 tests

This is the main PHP file of "HCT Community Database Management" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hct-community-database-management.php" instead of "hct_community_database.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin1,087 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP612725705
JavaScript204378
CSS1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2692.86%
▷ Protected methods00.00%
▷ Private methods27.14%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected