78% smartarget-social-sales

Code Review | Smartarget Social Sales

WordPress plugin Smartarget Social Sales scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-social...
  • 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: Nov 10, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 14
  • Update frequency: every 45.5 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /380 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.06MB] [CPU: ▼5.68ms] Passed 4 tests

An overview of server-side resources used by Smartarget Social Sales
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0742.61 ▼1.42
Dashboard /wp-admin3.41 ▲0.0256.22 ▼9.35
Posts /wp-admin/edit.php3.52 ▲0.1347.24 ▼5.70
Add New Post /wp-admin/post-new.php6.01 ▲0.0896.11 ▼6.25
Media Library /wp-admin/upload.php3.33 ▲0.0646.26 ▲8.71
Smartarget Social Sales /wp-admin/options-general.php?page=smartarget_social_proof_sales3.3034.11

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

How much does this plugin use your filesystem and database?
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
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Smartarget Social Sales
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲17521.24 ▲6.688.37 ▲6.4338.54 ▼4.62
Dashboard /wp-admin2,202 ▲2210.61 ▲4.96170.14 ▲73.9340.48 ▼4.87
Posts /wp-admin/edit.php2,122 ▲227.22 ▲5.25110.46 ▲73.6932.36 ▼4.04
Add New Post /wp-admin/post-new.php1,694 ▲15627.45 ▲4.38731.43 ▲46.2756.01 ▼2.84
Media Library /wp-admin/upload.php1,413 ▲169.48 ▲5.34173.79 ▲47.3743.85 ▼3.88
Smartarget Social Sales /wp-admin/options-general.php?page=smartarget_social_proof_sales2,35710.97205.98112.44

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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 | 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smartarget-social-sales/public/partials/smartarget-social-proof-sales-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-social-sales/admin/partials/smartarget-social-proof-sales-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: social proof, sales, abandoned cart plugin, related items, recommended items...

smartarget-social-sales/smartarget-social-proof-sales.php 85% from 13 tests

The principal PHP file in "Smartarget Social Sales" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("smartarget-social-sales.php" instead of "smartarget-social-proof-sales.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
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

Analyzing 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.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin