78% smartarget-line-chat-contact-us

Code Review | Smartarget Line Chat - Contact Us

WordPress plugin Smartarget Line Chat - Contact Us scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-line-c...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 24, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 19
  • Update frequency: every 37.7 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /736 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Smartarget Line Chat - Contact Us
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.15 ▼2.70
Dashboard /wp-admin3.37 ▲0.0752.92 ▼1.53
Posts /wp-admin/edit.php3.48 ▲0.1351.92 ▼0.84
Add New Post /wp-admin/post-new.php5.97 ▲0.0898.92 ▼3.47
Media Library /wp-admin/upload.php3.29 ▲0.0643.31 ▲6.43
Smartarget Line Chat - Contact Us /wp-admin/options-general.php?page=smartarget_line3.2635.77

Server storage [IO: ▲3.84MB] [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: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Smartarget Line Chat - Contact Us: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲13521.01 ▲6.5910.22 ▲8.2042.08 ▼1.69
Dashboard /wp-admin2,205 ▲3110.57 ▲5.06163.09 ▲73.2338.76 ▼3.22
Posts /wp-admin/edit.php2,116 ▲167.22 ▲5.23126.59 ▲88.0332.10 ▼4.28
Add New Post /wp-admin/post-new.php1,694 ▲16627.57 ▲4.17678.92 ▼21.5762.06 ▲9.05
Media Library /wp-admin/upload.php1,407 ▲79.69 ▲5.39198.82 ▲91.1747.92 ▼0.70
Smartarget Line Chat - Contact Us /wp-admin/options-general.php?page=smartarget_line2,4399.69225.33123.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smartarget-line-chat-contact-us/public/partials/smartarget-line-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-line-chat-contact-us/admin/partials/smartarget-line-admin-display.php:20

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 93% 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
7 plugin tags: support, smartarget, contact, lineme, line...

smartarget-line-chat-contact-us/smartarget-line.php 85% from 13 tests

The primary PHP file in "Smartarget Line Chat - Contact Us" version 1.2 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 ("smartarget-line-chat-contact-us.php" instead of "smartarget-line.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin868 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript654,369642
PHP12130522225
CSS2041

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin