83% xnbot

Code Review | XnBot Plugin

WordPress plugin XnBot Plugin scored83%from 54 tests.

About plugin

  • Plugin page: xnbot
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Mar 13, 2018
  • Latest release: Mar 13, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: extremenet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /452 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.03MB] [CPU: ▼1.72ms] Passed 4 tests

A check of server-side resources used by XnBot Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0645.43 ▲1.02
Dashboard /wp-admin3.41 ▲0.0676.92 ▲1.77
Posts /wp-admin/edit.php3.38 ▲0.0248.27 ▼7.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.71 ▼1.12
Media Library /wp-admin/upload.php3.25 ▲0.0238.95 ▲1.21

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for XnBot Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.23 ▲0.121.66 ▼0.3444.99 ▼7.21
Dashboard /wp-admin2,198 ▲215.55 ▼0.0994.62 ▼7.5671.86 ▲25.09
Posts /wp-admin/edit.php2,115 ▲121.97 ▼0.0639.19 ▲2.6734.34 ▼0.09
Add New Post /wp-admin/post-new.php1,555 ▲2721.10 ▼2.06709.60 ▲28.5543.91 ▼11.42
Media Library /wp-admin/upload.php1,412 ▲154.14 ▼0.10114.84 ▲17.3482.76 ▲40.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: status in wp-content/plugins/xnbot/frontend/view/settings.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/xnbot/index.php:26
    • > PHP Notice
      Trying to get property 'current_recycle_interactions' of non-object in wp-content/plugins/xnbot/frontend/view/settings.php on line 56
    • > PHP Notice
      Undefined variable: interactions in wp-content/plugins/xnbot/frontend/view/settings.php on line 56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/xnbot/backend/controller.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/xnbot/frontend/view/get_started.php:8
    • > PHP Notice
      Undefined variable: status in wp-content/plugins/xnbot/frontend/view/settings.php on line 24
    • > PHP Notice
      Undefined variable: access_api_key in wp-content/plugins/xnbot/frontend/view/settings.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/xnbot/frontend/view/settings.php:65
    • > PHP Notice
      Trying to get property 'current_interactions' of non-object in wp-content/plugins/xnbot/frontend/view/settings.php on line 56

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
  • Stable tag: Empty string
The official readme.txt might help

xnbot/index.php 92% from 13 tests

Analyzing the main PHP file in "XnBot Plugin" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("xnbot.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin9,665 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS520317,467
JavaScript55822041,614
PHP57147296
SVG100288

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png1.17KB0.82KB▼ 29.68%
assets/images/module_bg.png22.05KB9.65KB▼ 56.24%
assets/images/logo_100.png8.02KB3.46KB▼ 56.80%
assets/images/red_bg.png2.13KB1.70KB▼ 20.22%