84% author-chat

Code Review | Author Chat

WordPress plugin Author Chat scored84%from 54 tests.

About plugin

  • Plugin page: author-chat
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Jun 19, 2015
  • Latest release: Apr 29, 2021
  • Number of updates: 37
  • Update frequency: every 57.9 days
  • Top authors: Piotr Pesta (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

100+ active /20,957 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼14.10ms] Passed 4 tests

A check of server-side resources used by Author Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.1241.08 ▼0.49
Dashboard /wp-admin3.71 ▲0.0854.33 ▼11.79
Posts /wp-admin/edit.php3.82 ▲0.1455.62 ▲5.50
Add New Post /wp-admin/post-new.php3.58 ▼2.5749.51 ▼48.68
Media Library /wp-admin/upload.php3.63 ▲0.1443.78 ▲4.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: 1 new table, 20 new options
New tables
wp_author_chat
New WordPress options
widget_recent-comments
author_chat_settings_access_author
author_chat_settings_weekdays
widget_recent-posts
author_chat_settings_name
author_chat_settings_access_all_users
author_chat_settings_access_contributor
author_chat_db_version
author_chat_settings_access_subscriber
author_chat_settings_access_editor
...

Browser metrics Passed 4 tests

A check of browser resources used by Author Chat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,114 ▲36813.78 ▼0.621.86 ▲0.0940.51 ▼2.96
Dashboard /wp-admin2,505 ▲3256.02 ▲0.3298.96 ▲7.7883.18 ▲41.93
Posts /wp-admin/edit.php2,144 ▲442.39 ▲0.3647.48 ▲12.5734.26 ▼1.76
Add New Post /wp-admin/post-new.php1,561 ▲1623.49 ▲0.30678.01 ▼14.7439.42 ▼16.58
Media Library /wp-admin/upload.php1,446 ▲434.61 ▲0.50109.01 ▼8.6743.98 ▼3.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • author_chat_db_version
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/author-chat/acppauthorchat-process.php on line 34
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/author-chat/acppauthorchat-process.php on line 34
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/author-chat/acppauthorchat-process.php on line 34
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/author-chat/acppauthorchat-process.php on line 34
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/author-chat/acppauthorchat-process.php on line 34
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/author-chat/acppauthorchat-process.php on line 34

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

author-chat/acppauthorchat-author-chat.php 92% from 13 tests

Analyzing the main PHP file in "Author Chat" version 2.0.3
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("author-chat.php" instead of "acppauthorchat-author-chat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,821 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP4168109993
JavaScript1124156839
PO File5187196490
CSS13399425
Markdown112074

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions24
▷ Named functions2187.50%
▷ Anonymous functions312.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
emoticons.png8.29KB4.61KB▼ 44.43%