93% barc-chat

Code Review | Barc Chat

WordPress plugin Barc Chat scored 93% from 54 tests.

About plugin

  • Plugin page: barc-chat
  • Plugin version: 0.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.6
  • WordPress version: 5.8.1
  • First release: Feb 13, 2013
  • Latest release: Nov 23, 2014
  • Number of updates: 52
  • Update frequency: every 12.5 days
  • Top authors: barcinc (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

40+ active / 27,504 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼142.72ms] Passed 4 tests

This is a short check of server-side resources used by Barc Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1638.52 ▲16.20
Dashboard /wp-admin3.11 ▲0.0649.61 ▲9.00
Posts /wp-admin/edit.php3.16 ▲0.0644.42 ▼4.18
Add New Post /wp-admin/post-new.php5.48 ▲0.0493.69 ▼570.37
Media Library /wp-admin/upload.php3.05 ▲0.0532.68 ▼5.34
Barc Chat /wp-admin/options-general.php?page=Barc3.0828.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 5 new options
New WordPress options
Barc_plan
Barc_activated
Barc_code
Barc_page
Barc_position

Browser metrics Passed 4 tests

Barc Chat: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲12015.91 ▲0.3210.76 ▲1.0945.56 ▼7.04
Dashboard /wp-admin2,972 ▲385.95 ▼0.17136.98 ▼33.02116.98 ▲4.02
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0167.90 ▼2.6190.79 ▲0.56
Add New Post /wp-admin/post-new.php1,686 ▲318.81 ▲0.38406.70 ▲22.17108.67 ▼1.37
Media Library /wp-admin/upload.php1,812 ▲55.02 ▲0.02159.71 ▼11.63126.91 ▲2.11
Barc Chat /wp-admin/options-general.php?page=Barc1,4662.3859.14134.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/barc-chat/options.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Barc' not found in wp-content/plugins/barc-chat/comment_template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/barc-chat/barc.php:40

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: comments, admin, support, plugin, post...

barc-chat/barc.php 77% from 13 tests

This is the main PHP file of "Barc Chat" version 0.6.2, 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("barc-chat.php" instead of "barc.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 237 characters long)

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
Good job! No executable or dangerous file extensions detected865 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP35538320
CSS1250303
JavaScript1203151
PO File1353591

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
9 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ico-lock.png1.15KB0.42KB▼ 63.81%
images/title-verification.png2.17KB0.84KB▼ 61.23%
images/ico-phone.png1.20KB0.46KB▼ 61.66%
images/title-settings.png2.14KB0.76KB▼ 64.40%
images/title-premium.png1.63KB0.56KB▼ 65.45%