78% wp-chatbull

Code Review | WP Chatbull

WordPress plugin WP Chatbull scored78%from 54 tests.

About plugin

  • Plugin page: wp-chatbull
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2017
  • Latest release: Jun 22, 2019
  • Number of updates: 12
  • Update frequency: every 60.3 days
  • Top authors: pukhrajp (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

20+ active /1,709 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.03ms] Passed 4 tests

Server-side resources used by WP Chatbull
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.25 ▼1.72
Dashboard /wp-admin3.41 ▲0.1151.20 ▼2.95
Posts /wp-admin/edit.php3.53 ▲0.1751.89 ▼0.20
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.33 ▼15.23
Media Library /wp-admin/upload.php3.34 ▲0.1143.50 ▲3.64

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 642 new files
Database: no new tables, 14 new options
New WordPress options
gaxon_wpcbcp_pick_wpuser
gaxon_wpcbcp_enabled_chatbox
theysaidso_admin_options
can_compress_scripts
gaxon_wpcbcp_chatbull_dir
widget_recent-posts
gaxon_wpcbcp_widget_code
gaxon_wpcbcp_visiblity_tpe
widget_theysaidso_widget
gaxon_wpcbcp_cbwindow_pages
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Chatbull
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6313.29 ▼1.004.84 ▲2.9343.92 ▼2.29
Dashboard /wp-admin2,233 ▲565.86 ▲0.1791.80 ▼8.9373.28 ▲28.27
Posts /wp-admin/edit.php2,141 ▲382.37 ▲0.3736.93 ▼4.0034.78 ▼1.97
Add New Post /wp-admin/post-new.php1,713 ▲18722.78 ▼0.29771.93 ▲72.1537.92 ▼11.47
Media Library /wp-admin/upload.php1,438 ▲444.49 ▲0.26113.98 ▲11.9973.30 ▲29.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 248× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-chatbull/files/application/views/cmodule/partials/pagination.php
    • > /wp-content/plugins/wp-chatbull/files/application/language/english/canned-messages_lang.php
    • > /wp-content/plugins/wp-chatbull/files/system/core/Output.php
    • > /wp-content/plugins/wp-chatbull/files/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
    • > /wp-content/plugins/wp-chatbull/files/system/libraries/Ftp.php
    • > /wp-content/plugins/wp-chatbull/files/application/config/smileys.php
    • > /wp-content/plugins/wp-chatbull/files/application/migrations/20170523145761_add_user_address.php
    • > /wp-content/plugins/wp-chatbull/files/system/core/Hooks.php
    • > /wp-content/plugins/wp-chatbull/files/system/database/drivers/oci8/oci8_driver.php
    • > /wp-content/plugins/wp-chatbull/files/system/helpers/security_helper.php
  • 112× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/wp-chatbull/files/application/views/cmodule/emails/chat_transcript.php on line 18
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wp-chatbull/files/application/views/cmodule/emails/request_reply.php on line 13
    • > PHP Notice
      Trying to get property 'site_name' of non-object in wp-content/plugins/wp-chatbull/files/application/views/cmodule/emails/chat_transcript.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function theme_path() in wp-content/plugins/wp-chatbull/files/application/views/cmodule/agent_layout.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CP_AgentController' not found in wp-content/plugins/wp-chatbull/files/application/controllers/agents/Chat.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function base_url() in wp-content/plugins/wp-chatbull/files/application/views/chatbox/chatpanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CP_VisitorController' not found in wp-content/plugins/wp-chatbull/files/application/controllers/visitors/Chat.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CP_Model' not found in wp-content/plugins/wp-chatbull/files/application/models/Chat_request.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-chatbull/files/application/views/cmodule/users/profile.php:3
    • > PHP Notice
      Undefined variable: message in wp-content/plugins/wp-chatbull/files/application/views/cmodule/emails/forget_password.php on line 23

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 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

wp-chatbull/wp-chatbull.php 92% from 13 tests

This is the main PHP file of "WP Chatbull" 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 take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 498 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected97,986 lines of code in 471 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript939,1909,31442,052
PHP32610,41931,97139,888
CSS2370125111,253
Markdown884102,258
SVG5002,149
JSON900262
reStructuredText117053
HTML312250
XML10012
make1426
YAML1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity25.39
▷ Minimum class complexity1.00
▷ Maximum class complexity256.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes202
▷ Abstract classes52.48%
▷ Concrete classes19797.52%
▷ Final classes00.00%
Methods1,907
▷ Static methods140.73%
▷ Public methods1,32469.43%
▷ Protected methods57630.20%
▷ Private methods70.37%
Functions184
▷ Named functions184100.00%
▷ Anonymous functions00.00%
Constants77
▷ Global constants7698.70%
▷ Class constants11.30%
▷ Public constants1100.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
58 PNG files occupy 0.13MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
files/assets/cmodule/icon/android-chrome-48x48.png1.31KB0.99KB▼ 24.52%
files/assets/cmodule/icon/apple-touch-icon-76x76.png1.76KB1.41KB▼ 20.12%
files/assets/cmodule/images/people55.png2.86KB2.09KB▼ 26.78%
files/assets/cmodule/icon/mstile-310x310.png2.87KB2.43KB▼ 15.47%
files/assets/cmodule/icon/favicon-16x16.png0.75KB0.45KB▼ 39.63%