10% anytimereply

Code Review | AnyTimeReply - Sales chatbot

WordPress plugin AnyTimeReply - Sales chatbot scored10%from 54 tests.

About plugin

  • Plugin page: anytimereply
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.1-4.8
  • WordPress version: 6.3.1
  • First release: Sep 11, 2016
  • Latest release: Jul 21, 2017
  • Number of updates: 23
  • Update frequency: every 23.3 days
  • Top authors: spikersolns (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,590 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/anytimereply/AnyTimeReply.php+11
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.85ms] Passed 4 tests

Analyzing server-side resources used by AnyTimeReply - Sales chatbot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.18 ▼34.94
Dashboard /wp-admin2.09 ▼1.215.17 ▼47.52
Posts /wp-admin/edit.php2.09 ▼1.275.57 ▼47.23
Add New Post /wp-admin/post-new.php2.09 ▼3.807.18 ▼101.69
Media Library /wp-admin/upload.php2.09 ▼1.144.72 ▼30.10
AnyTimeReply Settings /wp-admin/options-general.php?page=anytime-reply-plugin2.095.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

AnyTimeReply - Sales chatbot: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,124 ▲36313.80 ▼0.559.28 ▲7.5345.66 ▲1.35
Dashboard /wp-admin2,286 ▲1095.52 ▼0.13123.70 ▲25.9856.09 ▲9.41
Posts /wp-admin/edit.php2,191 ▲912.02 ▲0.0634.62 ▼1.7245.79 ▲8.60
Add New Post /wp-admin/post-new.php1,605 ▲7922.47 ▼0.87536.32 ▼140.56177.56 ▲113.38
Media Library /wp-admin/upload.php1,488 ▲884.21 ▼0.04127.99 ▲19.6151.94 ▲1.60
AnyTimeReply Settings /wp-admin/options-general.php?page=anytime-reply-plugin9281.9926.4141.63

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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/anytimereply/AnyTimeReply.php+11
    Constant WP_DEBUG already defined
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > Notice in wp-content/plugins/anytimereply/AnyTimeReply.php+11
    Constant WP_DEBUG already defined
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the chatscript handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the chatscript handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquerypopupscript handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquerypopupscript handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the chatstyle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the chatstyle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=anytime-reply-plugin
    • > Notice in wp-content/plugins/anytimereply/AnyTimeReply.php+96
    Undefined index: id

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/anytimereply/AnyTimeReply.php:13

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: chatbot, customer support, facebook, support bot, virtual assistant...

anytimereply/AnyTimeReply.php 85% from 13 tests

The main PHP file in "AnyTimeReply - Sales chatbot" ver. 2.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("anytimereply.php" instead of "AnyTimeReply.php")
  • Description: The description should be shorter than 140 characters (currently 204 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected533 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1204223
JavaScript25510199
PHP1408111

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bluedot.png2.95KB0.25KB▼ 91.65%
images/logo.png16.41KB6.26KB▼ 61.86%