78% raptive-creatorbot

Code Review | Raptive Creatorbot

WordPress plugin Raptive Creatorbot scored78%from 54 tests.

About plugin

  • Plugin page: raptive-creatorbot
  • Plugin version: 1.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.0
  • WordPress version: 6.3.1
  • First release: Oct 13, 2023
  • Latest release: Oct 16, 2023
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: usetopic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /49 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.51ms] Passed 4 tests

An overview of server-side resources used by Raptive Creatorbot
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0845.71 ▲5.86
Dashboard /wp-admin3.38 ▲0.0349.42 ▼14.57
Posts /wp-admin/edit.php3.49 ▲0.1347.81 ▼1.03
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.24 ▼25.61
Media Library /wp-admin/upload.php3.30 ▲0.0736.52 ▼0.82

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Raptive Creatorbot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.14 ▼0.214.12 ▲2.5243.65 ▲4.33
Dashboard /wp-admin2,202 ▲255.56 ▼0.0886.83 ▼7.6238.32 ▼6.10
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0335.63 ▼5.2732.36 ▼2.76
Add New Post /wp-admin/post-new.php1,530 ▲423.49 ▲0.18678.49 ▲28.1264.18 ▼7.66
Media Library /wp-admin/upload.php1,398 ▼24.21 ▲0.0398.74 ▼4.7046.98 ▲1.07

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/raptive-creatorbot/public/partials/raptive-chatbot-insert-js.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/raptive-creatorbot/public/class-raptive-chatbot-public.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: chatbot, raptive

raptive-creatorbot/raptive-chatbot.php 92% from 13 tests

The primary PHP file in "Raptive Creatorbot" version 1.0.15 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("raptive-creatorbot.php" instead of "raptive-chatbot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin712 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15129587290
JavaScript23361251
CSS2349171

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 3.07MB with 1.83MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png12.53KB4.66KB▼ 62.84%
assets/icon-128x128.png2.91KB1.22KB▼ 58.03%
assets/screenshot-1.png1,464.42KB531.30KB▼ 63.72%
assets/icon-256x256.png5.98KB2.41KB▼ 59.70%
assets/screenshot-3.png91.91KB42.91KB▼ 53.32%