62% raopress-chat-firebase-chat-for-visitors

Code Review | Raopress Chat - Firebase Chat for Visitors

WordPress plugin Raopress Chat - Firebase Chat for Visitors scored62%from 54 tests.

About plugin

  • Plugin page: raopress-chat-fir...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 4, 2023
  • Latest release: Jun 19, 2023
  • Number of updates: 20
  • Update frequency: every 8.6 days
  • Top authors: raoinfotech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /499 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.17MB] [CPU: ▼47.78ms] Passed 4 tests

Analyzing server-side resources used by Raopress Chat - Firebase Chat for Visitors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6811.16 ▼32.06
Dashboard /wp-admin2.84 ▼0.4617.24 ▼36.18
Posts /wp-admin/edit.php2.84 ▼0.5118.37 ▼34.84
Add New Post /wp-admin/post-new.php2.84 ▼3.0516.15 ▼88.03
Media Library /wp-admin/upload.php2.84 ▼0.3815.14 ▼23.74
Settings /wp-admin/admin.php?page=firebase-chat-settings2.8416.39

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 1,073 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Raopress Chat - Firebase Chat for Visitors
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,512 ▲72614.80 ▲0.8624.67 ▲22.5925.67 ▼16.50
Dashboard /wp-admin2,240 ▲695.58 ▼0.0791.43 ▼4.5946.79 ▼2.89
Posts /wp-admin/edit.php2,148 ▲482.19 ▲0.1842.51 ▲5.4642.92 ▲2.24
Add New Post /wp-admin/post-new.php1,565 ▲3823.45 ▲0.31680.51 ▼7.6349.29 ▲1.06
Media Library /wp-admin/upload.php1,448 ▲484.25 ▲0.02110.45 ▲2.7351.05 ▲8.14
Settings /wp-admin/admin.php?page=firebase-chat-settings1,0242.4848.3931.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/public/class-rcfv-public.php+248
    Undefined index: ionic
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 28 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=firebase-chat-settings
    • > Notice in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/public/class-rcfv-public.php+248
    Undefined index: ionic
  • 28 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=firebase-chat-settings
    • > Notice in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/public/class-rcfv-public.php+251
    Undefined index: capacitor

SRP 0% from 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
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/raopress-chat-firebase-chat-for-visitors/admin/partials/rcfv-admin-display.php
    • > /wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/bin/jp.php
    • > /wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/mtdowling/jmespath.php/bin/jp.php
  • 462× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\GroupHandler' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/guzzlehttp/psr7/src/Uri.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Kreait\\Firebase\\Exception\\FirebaseException' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/kreait/firebase-php/src/Firebase/DynamicLink/CreateDynamicLink/FailedToCreateDynamicLink.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'RCFV\\Admin\\Settings\\RCFV_Menu' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/src/Admin/Settings/RCFV_SubMenu.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Kreait\\Firebase\\Database\\Query\\Sorter' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/kreait/firebase-php/src/Firebase/Database/Query/Sorter/OrderByChild.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestFactoryInterface' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/guzzlehttp/psr7/src/HttpFactory.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\StreamHandler' not found in wp-content/plugins/raopress-chat-firebase-chat-for-visitors/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:27

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: You can take inspiration from this readme.txt

raopress-chat-firebase-chat-for-visitors/raopress-chat.php 85% from 13 tests

The entry point to "Raopress Chat - Firebase Chat for Visitors" version 1.2.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("raopress-chat-firebase-chat-for-visitors.php" instead of "raopress-chat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin79,042 lines of code in 995 files:
LanguageFilesBlank linesComment linesLines of code
PHP87012,58331,87155,990
JSON40607,906
Markdown492,18806,103
JavaScript131,0847304,966
CSS84422533,556
YAML6452184
C23570132
reStructuredText1352959
make2171651
m41111438
C/C++ Header1101825
XML12018
Bourne Shell141614

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces117
Interfaces114
Traits54
Classes658
▷ Abstract classes192.89%
▷ Concrete classes63997.11%
▷ Final classes29245.70%
Methods4,272
▷ Static methods54512.76%
▷ Public methods3,38879.31%
▷ Protected methods2185.10%
▷ Private methods66615.59%
Functions361
▷ Named functions13537.40%
▷ Anonymous functions22662.60%
Constants477
▷ Global constants163.35%
▷ Class constants46196.65%
▷ Public constants38683.73%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pp.png24.63KB5.62KB▼ 77.19%
images/attach.png1.86KB1.83KB▼ 1.32%
images/send.png1.26KB1.22KB▼ 3.03%
images/close.png0.75KB0.73KB▼ 3.38%
assets/select2x2.png0.64KB0.77KB0.00%