89% premium-chat

Code Review | Premium Chat

WordPress plugin Premium Chat scored 89% from 54 tests.

About plugin

  • Plugin page: premium-chat
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 25, 2019
  • Latest release: Jan 17, 2023
  • Number of updates: 8
  • Update frequency: every 140.0 days
  • Top authors: premiumchat (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 22,417 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼7.71ms] Passed 4 tests

A check of server-side resources used by Premium Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0964.44 ▲19.64
Dashboard /wp-admin3.39 ▲0.0844.79 ▼4.22
Posts /wp-admin/edit.php3.50 ▲0.1448.71 ▲5.92
Add New Post /wp-admin/post-new.php4.90 ▼0.9952.40 ▼38.46
Media Library /wp-admin/upload.php3.31 ▲0.0838.01 ▲5.92
Premium.Chat /wp-admin/index.php?page=prmct_configurator3.2729.87

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_premium_chat_widget
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Premium Chat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.74 ▲0.442.67 ▲0.4347.88 ▲3.75
Dashboard /wp-admin2,207 ▲165.80 ▼0.0993.37 ▼20.0137.25 ▼11.38
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0539.08 ▲0.9535.90 ▲1.08
Add New Post /wp-admin/post-new.php6,586 ▲5,04429.32 ▲6.01853.36 ▲179.7351.99 ▼1.53
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.0094.90 ▼8.0241.37 ▼1.57
Premium.Chat /wp-admin/index.php?page=prmct_configurator8791.147.6051.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_premium_chat_widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

premium-chat/prmct.php 85% from 13 tests

The entry point to "Premium Chat" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("premium-chat.php" instead of "prmct.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin600 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP9132321400
CSS30782
JavaScript18751
Markdown118038
SVG20029

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.38
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2689.66%
▷ Protected methods00.00%
▷ Private methods310.34%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.75MB with 0.53MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshots/screenshot1.png251.13KB78.21KB▼ 68.86%
assets/screenshots/screenshot2.png296.01KB108.55KB▼ 63.33%
assets/images/home-widget.png215.86KB42.11KB▼ 80.49%