68% wp-assistance

Code Review | WpAssistance

WordPress plugin WpAssistance scored68%from 54 tests.

About plugin

  • Plugin page: wp-assistance
  • Plugin version: 0.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 10, 2020
  • Latest release: Apr 27, 2020
  • Number of updates: 11
  • Update frequency: every 1.8 days
  • Top authors: rahulbhangale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /593 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼52.23ms] Passed 4 tests

An overview of server-side resources used by WpAssistance
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.415.43 ▼32.21
Dashboard /wp-admin2.08 ▼1.235.66 ▼45.02
Posts /wp-admin/edit.php2.08 ▼1.285.74 ▼45.55
Add New Post /wp-admin/post-new.php2.08 ▼3.816.45 ▼86.12
Media Library /wp-admin/upload.php2.08 ▼1.157.71 ▼28.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WpAssistance
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲25513.69 ▼0.806.46 ▲4.7141.96 ▼1.25
Dashboard /wp-admin2,243 ▲554.93 ▲0.04114.09 ▲6.2274.59 ▲31.99
Posts /wp-admin/edit.php2,144 ▲552.01 ▼0.0342.87 ▲2.5838.67 ▲4.21
Add New Post /wp-admin/post-new.php1,563 ▲4023.17 ▲0.03747.73 ▲101.5262.42 ▼3.39
Media Library /wp-admin/upload.php1,437 ▲494.24 ▲0.05105.75 ▼23.7264.88 ▲7.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-assistance/admin/view/wa-settings.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-assistance/index.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-assistance/admin/CWAAdmin.class.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: voice bot, artificial intelligence, speech to text, whatsapp chat, chat bot...

wp-assistance/index.php 85% from 13 tests

"WpAssistance" version 0.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-assistance.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin462 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3319166
CSS1190148
JavaScript1230148

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/wp-icon.png0.47KB0.31KB▼ 34.85%
admin/images/wp-icon-256.png11.31KB4.99KB▼ 55.85%