78% kh-easy-user-settings

Code Review | KH Easy User Settings

WordPress plugin KH Easy User Settings scored 78% from 54 tests.

About plugin

  • Plugin page: kh-easy-user-sett...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2023
  • Latest release: Feb 22, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: knowhalim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.30ms] Passed 4 tests

Analyzing server-side resources used by KH Easy User Settings
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.86 ▼14.77
Dashboard /wp-admin3.40 ▲0.1046.48 ▼0.63
Posts /wp-admin/edit.php3.51 ▲0.1649.60 ▼1.41
Add New Post /wp-admin/post-new.php6.00 ▲0.1198.25 ▼4.38
Media Library /wp-admin/upload.php3.32 ▲0.0935.70 ▲1.29

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for KH Easy User Settings
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15313.54 ▼0.895.23 ▲3.1745.13 ▲1.65
Dashboard /wp-admin2,222 ▲345.86 ▼0.05104.65 ▼5.6145.76 ▲1.43
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0240.19 ▼0.8835.14 ▼2.32
Add New Post /wp-admin/post-new.php1,536 ▲2223.05 ▲5.53672.00 ▲57.6755.12 ▼2.47
Media Library /wp-admin/upload.php1,401 ▲134.32 ▲0.06101.90 ▼3.3245.52 ▲3.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/kh-easy-user-settings/public/partials/kh-user-settings-public-display.php
    • > /wp-content/plugins/kh-easy-user-settings/admin/partials/kh-user-settings-admin-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/kh-easy-user-settings/admin/class-kh-user-settings-admin.php:232

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: frontend form, user settings, frontend

kh-easy-user-settings/kh-user-settings.php 77% from 13 tests

The main PHP script in "KH Easy User Settings" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kh-easy-user-settings.php" instead of "kh-user-settings.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected485 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12178543448
CSS27831
JavaScript24546

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity1.62
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin