84% chatster

Code Review | Chatster

WordPress plugin Chatster scored84%from 54 tests.

About plugin

  • Plugin page: chatster
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2020
  • Latest release: Oct 23, 2020
  • Number of updates: 6
  • Update frequency: every 17.8 days
  • Top authors: frankspress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /563 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.05ms] Passed 4 tests

A check of server-side resources used by Chatster
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.15 ▼7.43
Dashboard /wp-admin3.31 ▲0.0048.50 ▼1.02
Posts /wp-admin/edit.php3.36 ▲0.0049.68 ▼1.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.65 ▼6.12
Media Library /wp-admin/upload.php3.23 ▲0.0035.88 ▼0.72

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 114 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Chatster
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.54 ▼0.191.98 ▲0.2744.94 ▲2.29
Dashboard /wp-admin2,192 ▲155.55 ▼0.0487.92 ▼15.2043.34 ▼0.70
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0538.37 ▼3.0133.30 ▼4.35
Add New Post /wp-admin/post-new.php1,526 ▼022.93 ▼0.55625.19 ▼33.7751.63 ▲0.08
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0694.96 ▼3.6543.06 ▼0.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant CHATSTER_PATH - assumed 'CHATSTER_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/chatster/includes/core/class.chat-form-serializer.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'CHATSTER_PATH/includes/functions.global.php' (include_path='.:/usr/share/php') in wp-content/plugins/chatster/includes/core/class.chat-form-serializer.php on line 4
    • > PHP Warning
      require_once(CHATSTER_PATH/includes/functions.global.php): failed to open stream: No such file or directory in wp-content/plugins/chatster/includes/core/class.chat-form-serializer.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #10, #11, #12, #13, #14, #2, #3, #4, #5, #6, #7, #8, #9 in chatster/assets to your readme.txt
The official readme.txt might help

chatster/chatster.php Passed 13 tests

The entry point to "Chatster" version 1.0.1 is a PHP file that has certain tags in its header comment area
65 characters long description:
Customizable real time chat with messaging system and BOT helper.

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
Everything looks great! No dangerous files found in this plugin17,837 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
PHP411,0021824,013
JavaScript108263903,871
CSS10254653,756
SVG1002,671
Sass1434341,768
LESS1434441,758

PHP code Passed 2 tests

A brief analysis 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.28
Average class complexity16.18
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces4
Interfaces0
Traits4
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods229
▷ Static methods4318.78%
▷ Public methods15668.12%
▷ Protected methods5925.76%
▷ Private methods146.11%
Functions43
▷ Named functions1227.91%
▷ Anonymous functions3172.09%
Constants15
▷ Global constants1173.33%
▷ Class constants426.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/red-pin.png2.43KB1.66KB▼ 31.48%
assets/img/header-img.png70.69KB19.57KB▼ 72.31%