78% smart-widget

Code Review | AppYourself Chat Plugin

WordPress plugin AppYourself Chat Plugin scored78%from 54 tests.

About plugin

  • Plugin page: smart-widget
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Mar 29, 2019
  • Number of updates: 2
  • Update frequency: every 4.0 days
  • Top authors: appyourself (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /451 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by AppYourself Chat Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.76 ▲2.03
Dashboard /wp-admin3.31 ▲0.0150.18 ▼0.89
Posts /wp-admin/edit.php3.36 ▲0.0149.05 ▼3.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.45 ▼10.66
Media Library /wp-admin/upload.php3.23 ▲0.0134.45 ▼10.73
AppYourself Chat /wp-admin/options-general.php?page=appyourselfchat3.1833.31

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
appyourselfchat_key
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AppYourself Chat Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.84 ▼0.518.34 ▲6.3739.63 ▼2.39
Dashboard /wp-admin2,196 ▲165.60 ▼0.0697.82 ▲5.7542.22 ▼4.42
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0139.83 ▲1.5335.86 ▼2.60
Add New Post /wp-admin/post-new.php1,530 ▲223.24 ▲0.19635.22 ▼52.6155.43 ▲1.85
Media Library /wp-admin/upload.php1,404 ▲14.21 ▼0.0396.17 ▼15.5544.32 ▼3.40
AppYourself Chat /wp-admin/options-general.php?page=appyourselfchat8072.0023.3729.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • appyourselfchat_key
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=appyourselfchat
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=appyourselfchat
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-widget/index.php:21

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 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 your attention:
  • Screenshots: Please add images for these screenshots: #1 (Admin to add hashcode in AppYourself Chat plugin page. (chat_plugin_screen3.jpg)), #2 (Live chat button on website after hashcode (chat_plugin_screen1.jpg)), #3 (Live chat window after clicking on “Live chat” button. (chat_plugin_screen2.jpg))
You can look at the official readme.txt

smart-widget/index.php 92% from 13 tests

The entry point to "AppYourself Chat Plugin" version 1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smart-widget.php" instead of "index.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
Good job! No executable or dangerous file extensions detected70 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16952
CSS10113
JavaScript1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin