84% chatmetrics

Code Review | Chat Metrics - Managed live chat plugin for wordpress

WordPress plugin Chat Metrics - Managed live chat plugin for wordpress scored84%from 54 tests.

About plugin

  • Plugin page: chatmetrics
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 24, 2019
  • Latest release: Jun 25, 2019
  • Number of updates: 5
  • Update frequency: every 5.0 days
  • Top authors: chatmetrics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /680 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.68ms] Passed 4 tests

An overview of server-side resources used by Chat Metrics - Managed live chat plugin for wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.95 ▼4.28
Dashboard /wp-admin3.36 ▲0.0546.00 ▼6.30
Posts /wp-admin/edit.php3.41 ▲0.0554.07 ▲5.90
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.42 ▼2.61
Media Library /wp-admin/upload.php3.28 ▲0.0536.37 ▲2.47

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
chatmetrics_url
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Chat Metrics - Managed live chat plugin for wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.30 ▼0.911.63 ▼0.1637.74 ▼6.35
Dashboard /wp-admin2,219 ▲286.01 ▲0.1598.13 ▼23.6139.63 ▼7.10
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0440.37 ▲4.0436.96 ▼2.71
Add New Post /wp-admin/post-new.php1,547 ▲1422.78 ▼0.52586.14 ▼25.5458.67 ▲8.09
Media Library /wp-admin/upload.php1,401 ▲164.29 ▼0.0697.77 ▼5.5740.50 ▼5.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/chatmetrics/chatmetrics.php:18

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in chatmetrics/assets to your readme.txt
Please take inspiration from this readme.txt

chatmetrics/chatmetrics.php Passed 13 tests

Analyzing the main PHP file in "Chat Metrics - Managed live chat plugin for wordpress" version 1.0
136 characters long description:
Chat Metrics is a 24/7 fully managed live chat service where you only get sales qualified leads. We convert your web traffic into leads.

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
No dangerous file extensions were detected384 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13412234
CSS1235138
JavaScript12112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin