73% jheck-chat

Code Review | Jheck Chat

WordPress plugin Jheck Chat scored73%from 54 tests.

About plugin

  • Plugin page: jheck-chat
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4.2
  • WordPress version: 6.3.1
  • First release: Nov 26, 2015
  • Latest release: Mar 11, 2016
  • Number of updates: 203
  • Update frequency: every 0.5 days
  • Top authors: jeric_izon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,265 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.43MB] [CPU: ▼38.76ms] Passed 4 tests

This is a short check of server-side resources used by Jheck Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0727.96 ▼16.54
Dashboard /wp-admin3.59 ▲0.2820.41 ▼35.85
Posts /wp-admin/edit.php3.59 ▲0.2323.21 ▼29.77
Add New Post /wp-admin/post-new.php3.59 ▼2.3021.40 ▼71.82
Media Library /wp-admin/upload.php3.59 ▲0.3621.49 ▼17.60

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 252 new files
Database: 1 new table, 8 new options
New tables
wp_jheck_chat_inbox
New WordPress options
widget_recent-comments
can_compress_scripts
jheck_option
theysaidso_admin_options
db_upgraded
jc_db_version
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Jheck Chat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.70 ▲0.331.12 ▼1.1881.17 ▲38.13
Dashboard /wp-admin2,210 ▲335.56 ▼0.1286.10 ▼14.2071.38 ▲27.58
Posts /wp-admin/edit.php2,112 ▲91.98 ▼0.0233.15 ▼7.0230.43 ▼5.63
Add New Post /wp-admin/post-new.php1,703 ▲29722.10 ▲4.20687.58 ▲64.8668.54 ▲16.54
Media Library /wp-admin/upload.php1,418 ▲184.20 ▼0.0398.84 ▼8.0686.08 ▲38.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/jheck-chat/vafpress/includes/wpalchemy/MetaBox.php+61
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • jheck_option
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 120× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/jheck-chat/vafpress/classes/control/field/codeeditor.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Res' not found in wp-content/plugins/jheck-chat/vafpress/views/control/template_control_foot.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Security' not found in wp-content/plugins/jheck-chat/vafpress/data/sources.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/jheck-chat/vafpress/views/option/restore.php:4
    • > PHP Warning
      include(): Failed opening 'JC_URL_PATHinc/shortcodes/s_jcform.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/jheck-chat/inc/shortcodes.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Text' not found in wp-content/plugins/jheck-chat/vafpress/views/control/html.php:5
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/jheck-chat/vafpress/views/control/template_control_head.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Text' not found in wp-content/plugins/jheck-chat/vafpress/views/control/notebox.php:6
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/jheck-chat/vafpress/views/control/notebox.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMultiImage' not found in wp-content/plugins/jheck-chat/vafpress/classes/control/field/radioimage.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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 your attention:
  • Screenshots: Add an image for screenshot #1 (Chat box opened.)
The official readme.txt might help

jheck-chat/jheck-chat.php 85% from 13 tests

The main PHP file in "Jheck Chat" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 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 plugin19,653 lines of code in 176 files:
LanguageFilesBlank linesComment linesLines of code
PHP972,2582,6839,376
CSS231611956,013
JavaScript515053163,120
SVG2001,054
Markdown231089
JSON1001

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity21.10
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes57
▷ Abstract classes47.02%
▷ Concrete classes5392.98%
▷ Final classes00.00%
Methods509
▷ Static methods9017.68%
▷ Public methods47693.52%
▷ Protected methods193.73%
▷ Private methods142.75%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants42
▷ Global constants3992.86%
▷ Class constants37.14%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
35 PNG files occupy 0.70MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vafpress/public/img/bootstrap-colorpicker/alpha.png3.19KB1.68KB▼ 47.45%
vafpress/public/img/select2/select2x2.png0.83KB0.77KB▼ 6.15%
vafpress/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
vafpress/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
template/template_3/preview.png28.96KB6.64KB▼ 77.06%