93% uhmi

Code Review | Uhmi

WordPress plugin Uhmi scored 93% from 54 tests.

About plugin

  • Plugin page: uhmi
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 5.8.1
  • First release: May 10, 2019
  • Latest release: Nov 13, 2019
  • Number of updates: 5
  • Update frequency: every 49.6 days
  • Top authors: uhmi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 470 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.08MB] [CPU: ▼185.13ms] Passed 4 tests

Analyzing server-side resources used by Uhmi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.0131.27 ▼10.20
Dashboard /wp-admin3.03 ▼0.0333.12 ▼19.56
Posts /wp-admin/edit.php3.09 ▼0.0239.54 ▼11.30
Add New Post /wp-admin/post-new.php5.15 ▼0.2884.36 ▼699.44
Media Library /wp-admin/upload.php3.05 ▲0.0529.78 ▼5.11

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 1 new option
New WordPress options
uhmi_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Uhmi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲19616.40 ▲0.7812.04 ▼0.7848.12 ▼3.56
Dashboard /wp-admin3,032 ▲1017.09 ▲1.12160.28 ▼1.16123.80 ▲13.73
Posts /wp-admin/edit.php2,807 ▲682.56 ▼0.1581.40 ▲4.90127.80 ▲39.58
Add New Post /wp-admin/post-new.php1,729 ▲4618.21 ▼0.16436.70 ▼13.30136.01 ▲17.09
Media Library /wp-admin/upload.php1,872 ▲655.51 ▲0.50155.78 ▼24.56134.79 ▲11.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 117× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'UHMI_PLUGIN_DIR_ADMIN/metaboxes/content_data/get_meta.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/uhmi/app/admin/metaboxes/content_data.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/uhmi/app/admin/views/settings/button.php:1
    • > PHP Warning
      include(UHMI_PLUGIN_DIR_ADMIN/register_shortcodes.php): failed to open stream: No such file or directory in wp-content/plugins/uhmi/app/admin/admin.php on line 9
    • > PHP Warning
      Use of undefined constant UHMI_PLUGIN_DIR_ADMIN - assumed 'UHMI_PLUGIN_DIR_ADMIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/uhmi/app/admin/admin.php on line 4
    • > PHP Warning
      Use of undefined constant UHMI_PLUGIN_DIR_ADMIN - assumed 'UHMI_PLUGIN_DIR_ADMIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/uhmi/app/admin/admin.php on line 23
    • > PHP Warning
      include(UHMI_PLUGIN_DIR_ADMIN/blank_state.php): failed to open stream: No such file or directory in wp-content/plugins/uhmi/app/admin/admin.php on line 18
    • > PHP Warning
      include(UHMI_PLUGIN_DIR_PUBLIC/shortcodes/uhmi.php): failed to open stream: No such file or directory in wp-content/plugins/uhmi/app/public/public.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uhmi/app/admin/get_started.php:57
    • > PHP Warning
      include(): Failed opening 'UHMI_PLUGIN_DIR_ADMIN/settings.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/uhmi/app/admin/admin.php on line 19
    • > PHP Warning
      Use of undefined constant UHMI_PLUGIN_DIR - assumed 'UHMI_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/uhmi/app/public/public.php on line 10

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add a description for screenshot #3 in uhmi/assets to your readme.txt
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

uhmi/uhmi.php 92% from 13 tests

This is the main PHP file of "Uhmi" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 242 characters long)

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
There were no executable files found in this plugin2,126 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP457699392,117
JavaScript4004
CSS2002
JSON2002
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.00
▷ Minimum class complexity7.00
▷ Maximum class complexity31.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods62
▷ Static methods2540.32%
▷ Public methods4775.81%
▷ Protected methods1524.19%
▷ Private methods00.00%
Functions80
▷ Named functions7897.50%
▷ Anonymous functions22.50%
Constants20
▷ Global constants1050.00%
▷ Class constants1050.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin