83% chatsystemio

Code Review | ChatSystem.io

WordPress plugin ChatSystem.io scored83%from 54 tests.

About plugin

  • Plugin page: chatsystemio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2015
  • Latest release: Aug 16, 2015
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: bhoopendra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,393 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.05ms] Passed 4 tests

Server-side resources used by ChatSystem.io
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.88 ▼5.78
Dashboard /wp-admin3.33 ▼0.0144.24 ▼16.34
Posts /wp-admin/edit.php3.38 ▲0.0246.15 ▲0.95
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.96 ▼7.38
Media Library /wp-admin/upload.php3.25 ▲0.0232.33 ▼2.68
ChatSystem Settings /wp-admin/options-general.php?page=chat-setting-admin3.2228.29

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ChatSystem.io
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.21 ▼1.084.98 ▲2.8146.15 ▼1.37
Dashboard /wp-admin2,210 ▲255.88 ▼0.04104.13 ▼15.2437.67 ▼7.39
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0537.68 ▼0.5833.73 ▲1.67
Add New Post /wp-admin/post-new.php1,541 ▲1923.34 ▲0.07628.63 ▼63.8556.70 ▼8.73
Media Library /wp-admin/upload.php1,392 ▲74.22 ▲0.0196.72 ▼9.2043.65 ▼1.32
ChatSystem Settings /wp-admin/options-general.php?page=chat-setting-admin7972.1923.1028.22

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatsystemio/chatsystem.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === chatsystemio === )
You can look at the official readme.txt

chatsystemio/chatsystem.php 85% from 13 tests

The principal PHP file in "ChatSystem.io" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("chatsystemio.php" instead of "chatsystem.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected94 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1265094

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.21MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png77.49KB41.58KB▼ 46.34%
screenshot-3.png39.88KB18.76KB▼ 52.95%
img/chat-system.png5.96KB2.79KB▼ 53.19%
screenshot-2.png89.52KB44.39KB▼ 50.42%