94% counselchat

Code Review | CounselChat

WordPress plugin CounselChat scored 94% from 54 tests.

About plugin

  • Plugin page: counselchat
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 5.8.1
  • First release: Apr 28, 2016
  • Latest release: Apr 28, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: counselchat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 507 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by CounselChat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0144.54 ▲9.34
Dashboard /wp-admin3.08 ▲0.0251.46 ▲4.68
Posts /wp-admin/edit.php3.13 ▲0.0146.56 ▼0.96
Add New Post /wp-admin/post-new.php5.43 ▼0.0191.49 ▼558.98
Media Library /wp-admin/upload.php3.02 ▲0.0133.21 ▼2.46

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for CounselChat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,695 ▲10016.23 ▲0.778.77 ▼1.6449.33 ▲1.59
Dashboard /wp-admin2,974 ▲405.91 ▼0.06143.42 ▼0.94132.94 ▲6.83
Posts /wp-admin/edit.php2,754 ▲152.58 ▼0.1173.24 ▲9.8097.32 ▼1.24
Add New Post /wp-admin/post-new.php1,693 ▲1018.33 ▼0.32383.12 ▼13.02116.38 ▼3.15
Media Library /wp-admin/upload.php1,765 ▼455.02 ▲0.02138.58 ▼32.58139.91 ▲11.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/counselchat/includes/counselchat-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/counselchat/includes/answers.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/counselchat/includes/ask.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/counselchat/counselchat.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === counselchat === )
You can take inspiration from this readme.txt

counselchat/counselchat.php 92% from 13 tests

This is the main PHP file of "CounselChat" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 410 characters long)

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
Everything looks great! No dangerous files found in this plugin105 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP51510100
CSS1205

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png1.11KB1.01KB▼ 9.20%