84% ana-chatbot

Code Review | Ana Chatbot

WordPress plugin Ana Chatbot scored84%from 54 tests.

About plugin

  • Plugin page: ana-chatbot
  • Plugin version: 1.0
  • PHP compatiblity: 7.0.23+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.5
  • WordPress version: 6.3.1
  • First release: May 17, 2018
  • Latest release: Jul 30, 2018
  • Number of updates: 4
  • Update frequency: every 19.0 days
  • Top authors: anachatbot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,208 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 successfully, without throwing any errors or notices

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

Server-side resources used by Ana Chatbot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.65 ▼2.60
Dashboard /wp-admin3.31 ▲0.0148.31 ▼2.66
Posts /wp-admin/edit.php3.36 ▲0.0147.29 ▼1.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.54 ▼10.46
Media Library /wp-admin/upload.php3.24 ▲0.0140.11 ▲7.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 43 new files
Database: 1 new table, 6 new options
New tables
wp_userdetails
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Ana Chatbot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,722 ▼2443.15 ▲28.39530.11 ▲528.2642.23 ▼4.23
Dashboard /wp-admin2,218 ▲305.86 ▲0.8298.03 ▼17.5672.82 ▲31.67
Posts /wp-admin/edit.php2,104 ▲151.99 ▲0.0335.52 ▼6.1933.85 ▲3.29
Add New Post /wp-admin/post-new.php1,681 ▲14822.00 ▼1.25722.40 ▲70.7257.48 ▲11.99
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0496.54 ▼5.7075.00 ▲31.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/ana-chatbot/ANAplugin.php:32

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

ana-chatbot/ANAplugin.php 92% from 13 tests

Analyzing the main PHP file in "Ana Chatbot" version 1.0
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ana-chatbot.php" instead of "ANAplugin.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
Everything looks great! No dangerous files found in this plugin89,658 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript75,15552,60788,199
SVG805788
PHP16632623
HTML11026
CSS20022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ANA/ANAFiles/dist/assets/img/ana-logo-trans.png30.03KB13.37KB▼ 55.47%
ANA/ANAUploads/ana.png12.97KB4.62KB▼ 64.35%
ana-logo.png12.97KB4.62KB▼ 64.35%
ANA/ANAFiles/dist/assets/img/ana-logo.png78.49KB37.97KB▼ 51.63%
favicon.png3.18KB0.45KB▼ 85.86%