90% staffing-engine-chatbot

Code Review | Staffing Engine - Chatbot

WordPress plugin Staffing Engine - Chatbot scored90%from 54 tests.

About plugin

  • Plugin page: staffing-engine-c...
  • Plugin version: 0.9.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5+
  • WordPress version: 6.3.1
  • First release: Jul 27, 2022
  • Latest release: Sep 13, 2023
  • Number of updates: 26
  • Update frequency: every 15.9 days
  • Top authors: staffingengine (76.92%)pbearne (26.92%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.11ms] Passed 4 tests

Analyzing server-side resources used by Staffing Engine - Chatbot
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.46 ▲1.02
Dashboard /wp-admin3.41 ▲0.1055.09 ▲8.89
Posts /wp-admin/edit.php3.53 ▲0.1749.98 ▲5.80
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.73 ▼16.19
Media Library /wp-admin/upload.php3.32 ▲0.0935.96 ▲0.94
Staffing Engine /wp-admin/options-general.php?page=staffing_engine_chatbot3.3137.15

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Staffing Engine - Chatbot
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲20914.82 ▲0.441.71 ▲0.0937.71 ▼0.76
Dashboard /wp-admin2,350 ▲1656.43 ▲1.49132.52 ▲17.7840.36 ▼2.04
Posts /wp-admin/edit.php2,259 ▲1703.35 ▲1.3152.98 ▲13.9331.41 ▼4.24
Add New Post /wp-admin/post-new.php1,520 ▼1017.79 ▼0.62579.03 ▼26.9234.16 ▼19.70
Media Library /wp-admin/upload.php1,392 ▲74.22 ▲0.0279.67 ▼20.2139.85 ▼0.98
Staffing Engine /wp-admin/options-general.php?page=staffing_engine_chatbot1,4353.1641.0931.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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 SRP test was a success

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

staffing-engine-chatbot/staffing-engine-chatbot.php Passed 13 tests

The primary PHP file in "Staffing Engine - Chatbot" version 0.9.4 is used by WordPress to initiate all plugin functionality
69 characters long description:
Provides the setting page and inserts the chatbot code into the site.

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 plugin1,554 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP92427311,384
JavaScript32272134
SVG10033
CSS3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity56.00
▷ Minimum class complexity6.00
▷ Maximum class complexity158.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes375.00%
Methods66
▷ Static methods69.09%
▷ Public methods3451.52%
▷ Protected methods1015.15%
▷ Private methods2233.33%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants13
▷ Global constants1184.62%
▷ Class constants215.38%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/assets/staffing-engine-chatbot_default.png24.45KB14.26KB▼ 41.69%