78% smartarget-contact-us

Code Review | Smartarget - Get 40% more sales, improve user engagement with 25+ free apps.

WordPress plugin Smartarget - Get 40% more sales, improve user engagement with 25+ free apps. scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-contac...
  • Plugin version: 1.2.21
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 27, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 72
  • Update frequency: every 17.1 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /8,989 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: ▼7.53ms] Passed 4 tests

An overview of server-side resources used by Smartarget - Get 40% more sales, improve user engagement with 25+ free apps.
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.32 ▲0.32
Dashboard /wp-admin3.38 ▲0.0351.37 ▼12.74
Posts /wp-admin/edit.php3.49 ▲0.1351.36 ▼2.70
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.85 ▼15.00
Media Library /wp-admin/upload.php3.30 ▲0.0736.02 ▲5.03
Smartarget /wp-admin/options-general.php?page=smartarget3.2930.35

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Smartarget - Get 40% more sales, improve user engagement with 25+ free apps.
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲20721.19 ▲6.819.40 ▲7.3544.05 ▼7.60
Dashboard /wp-admin2,245 ▲5710.86 ▲4.96188.75 ▲73.7547.36 ▲1.85
Posts /wp-admin/edit.php2,139 ▲477.27 ▲5.24120.70 ▲82.1040.16 ▲3.05
Add New Post /wp-admin/post-new.php1,712 ▲17927.87 ▲4.96714.78 ▲36.9551.14 ▲0.83
Media Library /wp-admin/upload.php1,430 ▲459.48 ▲5.30186.50 ▲80.5849.93 ▲6.03
Smartarget /wp-admin/options-general.php?page=smartarget3,40111.46200.20111.11

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/smartarget-contact-us/public/partials/smartarget-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/smartarget-contact-us/admin/partials/smartarget-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The main file in "Smartarget - Get 40% more sales, improve user engagement with 25+ free apps." v. 1.2.21 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("smartarget-contact-us.php" instead of "smartarget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected388 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12180558341
JavaScript2115447
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.34
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected