77% relic-sales-motivator-woocommerce-lite

Code Review | Relic Sales Motivator WooCommerce Lite

WordPress plugin Relic Sales Motivator WooCommerce Lite scored77%from 54 tests.

About plugin

  • Plugin page: relic-sales-motiv...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 14, 2017
  • Latest release: Nov 14, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: cyberkishor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /685 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.73ms] Passed 4 tests

An overview of server-side resources used by Relic Sales Motivator WooCommerce Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1130.44 ▼10.75
Dashboard /wp-admin3.43 ▲0.1350.58 ▼2.47
Posts /wp-admin/edit.php3.55 ▲0.1955.55 ▲3.93
Add New Post /wp-admin/post-new.php6.03 ▲0.1588.42 ▼19.33
Media Library /wp-admin/upload.php3.35 ▲0.1336.82 ▼2.35

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 10 new options
New WordPress options
sales-motivator-woocommerce-lite_free_shipping
can_compress_scripts
sales-motivator-woocommerce-lite_recent_sales
widget_recent-comments
sales-motivator-woocommerce-lite_bought_together
widget_recent-posts
sales-motivator-woocommerce-lite_settings
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Relic Sales Motivator WooCommerce Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18513.61 ▼0.7413.42 ▲11.7548.52 ▲3.40
Dashboard /wp-admin2,225 ▲485.80 ▲0.2095.67 ▼3.1838.74 ▼5.27
Posts /wp-admin/edit.php2,112 ▲92.32 ▲0.3143.36 ▼0.4138.62 ▲2.85
Add New Post /wp-admin/post-new.php1,558 ▲3223.12 ▼0.56665.91 ▲35.3334.88 ▼27.20
Media Library /wp-admin/upload.php1,431 ▲314.36 ▲0.0790.98 ▼16.0844.21 ▼3.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-posts
    • sales-motivator-woocommerce-lite_bought_together
    • db_upgraded
    • can_compress_scripts
    • sales-motivator-woocommerce-lite_recent_sales
    • sales-motivator-woocommerce-lite_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • sales-motivator-woocommerce-lite_free_shipping
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/relic-sales-motivator-woocommerce-lite/admin/partials/pages/about.php
    • > /wp-content/plugins/relic-sales-motivator-woocommerce-lite/admin/partials/pages/settings.php
    • > /wp-content/plugins/relic-sales-motivator-woocommerce-lite/admin/partials/pages/how-to-use.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/relic-sales-motivator-woocommerce-lite/public/partials/sales-motivator-woocommerce-public-display.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/relic-sales-motivator-woocommerce-lite/admin/partials/sales-motivator-woocommerce-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/relic-sales-motivator-woocommerce-lite/admin/partials/pages/recent-sales.php:19
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/relic-sales-motivator-woocommerce-lite/admin/partials/pages/freequently-bought.php:19
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/relic-sales-motivator-woocommerce-lite/admin/partials/pages/free-shipping.php:19

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 94% from 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
Attributes that need to be fixed: You can look at the official readme.txt

relic-sales-motivator-woocommerce-lite/sales-motivator-woocommerce.php 77% from 13 tests

Analyzing the main PHP file in "Relic Sales Motivator WooCommerce Lite" version 1.0.0
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 307 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("relic-sales-motivator-woocommerce-lite.php" instead of "sales-motivator-woocommerce.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
Success! There were no dangerous files found in this plugin7,226 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,1853615,074
PHP183496011,214
CSS34921938

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods54
▷ Static methods23.70%
▷ Public methods4583.33%
▷ Protected methods00.00%
▷ Private methods916.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.20MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/reliccommerce.png8.45KB5.14KB▼ 39.20%
public/images/close.png4.32KB3.39KB▼ 21.57%
admin/images/recent-sales-setting.png41.65KB9.81KB▼ 76.45%
public/images/bg.png18.32KB18.57KB0.00%
admin/images/position_top.png1.26KB0.11KB▼ 91.14%