77% smaily-for-woocommerce

Code Review | Smaily for WooCommerce

WordPress plugin Smaily for WooCommerce scored 77% from 54 tests.

About plugin

  • Plugin page: smaily-for-woocom...
  • Plugin version: 1.11.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 6.3.1
  • First release: Dec 17, 2018
  • Latest release: Apr 19, 2023
  • Number of updates: 48
  • Update frequency: every 33.2 days
  • Top authors: sendsmaily (83.33%)marispulk (14.58%)tomabel (6.25%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 5,011 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.12ms] Passed 4 tests

A check of server-side resources used by Smaily for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.64 ▲3.97
Dashboard /wp-admin3.31 ▲0.0042.38 ▼5.26
Posts /wp-admin/edit.php3.36 ▲0.0045.29 ▼2.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.19 ▼3.22
Media Library /wp-admin/upload.php3.23 ▲0.0031.94 ▼1.24

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Smaily for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.18 ▼1.402.26 ▲0.4042.16 ▲2.61
Dashboard /wp-admin2,206 ▲214.86 ▼1.03107.69 ▲5.8241.81 ▲0.73
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0139.83 ▲2.6834.83 ▲0.80
Add New Post /wp-admin/post-new.php1,533 ▲523.57 ▲0.24664.93 ▼25.0053.66 ▼0.05
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.0694.36 ▼1.4741.73 ▲0.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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/smaily-for-woocommerce/smaily-for-woocommerce.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smaily-for-woocommerce/inc/Widget/SmailyWidget.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/smaily-for-woocommerce/migrations/upgrade-1-0-0.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/smaily-for-woocommerce/templates/smaily-rss-feed.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Smaily_Inc\\Base\\DataHandler' not found in wp-content/plugins/smaily-for-woocommerce/templates/smaily-woocommerce-admin.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/smaily-for-woocommerce/migrations/upgrade-1-0-0.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/smaily-for-woocommerce/migrations/upgrade-1-0-0.php on line 8

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 86% 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
4 plugin tags: email, newsletter, smaily, woocommerce

smaily-for-woocommerce/smaily-for-woocommerce.php 69% from 13 tests

The main PHP script in "Smaily for WooCommerce" version 1.11.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Description: The description should be shorter than 140 characters (currently 226 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin4,760 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP305101,2083,224
PO File2288338639
SVG500456
CSS34818322
JavaScript32225114
JSON1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity22.17
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods119
▷ Static methods3327.73%
▷ Public methods10588.24%
▷ Protected methods65.04%
▷ Private methods86.72%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin