84% ccrobot

Code Review | ccRobot

WordPress plugin ccRobot scored84%from 54 tests.

About plugin

  • Plugin page: ccrobot
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 31, 2019
  • Latest release: Jan 25, 2023
  • Number of updates: 16
  • Update frequency: every 83.5 days
  • Top authors: ccrobot (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10+ active /3,454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by ccRobot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.06 ▼15.31
Dashboard /wp-admin3.31 ▲0.0148.13 ▼1.19
Posts /wp-admin/edit.php3.36 ▲0.0146.47 ▼10.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.32 ▼12.50
Media Library /wp-admin/upload.php3.24 ▲0.0139.93 ▼0.30

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_ccr_button_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ccRobot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.67 ▼0.7810.89 ▲8.2444.33 ▼18.45
Dashboard /wp-admin2,206 ▲155.86 ▲0.96111.19 ▼0.0440.99 ▼1.81
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0237.12 ▼0.7336.06 ▼0.71
Add New Post /wp-admin/post-new.php1,533 ▲323.04 ▲4.49754.01 ▲133.6661.72 ▲8.33
Media Library /wp-admin/upload.php1,385 ▼34.26 ▼0.10112.63 ▼2.0747.97 ▲1.05

Uninstaller [IO: ▲0.00MB] [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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_ccr_button_widget
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ccrobot/includes/ccrobot-class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ccrobot/includes/ccrobot-scripts.php:9

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: chatbot, customer, ccrobot, automation, livechat...

ccrobot/ccrobot.php Passed 13 tests

The main PHP file in "ccRobot" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
38 characters long description:
Adds a button to start ccRobot chatbot

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 detected855 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24931468
PHP32022386
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity62.00
▷ Minimum class complexity62.00
▷ Maximum class complexity62.00
Average method complexity9.71
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin