72% sip-reviews-shortcode-woocommerce

Code Review | SIP Reviews Shortcode for WooCommerce

WordPress plugin SIP Reviews Shortcode for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: sip-reviews-short...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 10, 2015
  • Latest release: Jun 19, 2022
  • Number of updates: 64
  • Update frequency: every 39.1 days
  • Top authors: shopitpress (93.75%)gandhihitesh9 (7.81%)

Code review

54 tests

User reviews

21 reviews

Install metrics

200+ active /12,768 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.82ms] Passed 4 tests

An overview of server-side resources used by SIP Reviews Shortcode for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.12 ▲2.39
Dashboard /wp-admin3.31 ▼0.0448.29 ▼12.35
Posts /wp-admin/edit.php3.36 ▲0.0043.58 ▼3.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.10 ▼15.19
Media Library /wp-admin/upload.php3.23 ▲0.0033.10 ▼0.31
Reviews Shortcode /wp-admin/admin.php?page=sip-reviews-shortcode-settings3.0025.37
ShopitPress Extras /wp-admin/admin.php?page=sip-extras3.0024.13

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 72 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_sip_reviews_shortcode_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SIP Reviews Shortcode for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.101.67 ▼0.0243.75 ▲4.72
Dashboard /wp-admin2,209 ▲205.90 ▼0.0295.99 ▼11.6338.80 ▼4.62
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0036.09 ▲1.1335.87 ▲5.82
Add New Post /wp-admin/post-new.php1,514 ▼617.54 ▼5.66734.53 ▲68.7157.31 ▲4.14
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0696.04 ▼14.4744.41 ▼1.28
Reviews Shortcode /wp-admin/admin.php?page=sip-reviews-shortcode-settings280.440.073.76
ShopitPress Extras /wp-admin/admin.php?page=sip-extras280.440.233.46

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_sip_reviews_shortcode_widget
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/index.php
    • > /wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/pro.php
    • > /wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/help.php
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SIP_RSWC_UTM_CAMPAIGN - assumed 'SIP_RSWC_UTM_CAMPAIGN' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/plugin.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sip-reviews-shortcode-woocommerce/public/more-post-rating.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/settings.php:2
    • > PHP Warning
      Use of undefined constant SIP_RSWC_UTM_CAMPAIGN - assumed 'SIP_RSWC_UTM_CAMPAIGN' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/pro.php on line 195
    • > PHP Warning
      include(SIP_RSWC_DIRadmin/partials/ui/affiliate.php): failed to open stream: No such file or directory in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/pro.php on line 204
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/plugin.php:10
    • > PHP Warning
      Use of undefined constant SIP_RSWC_UTM_CAMPAIGN - assumed 'SIP_RSWC_UTM_CAMPAIGN' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/pro.php on line 132
    • > PHP Warning
      Use of undefined constant SIP_RSWC_VERSION - assumed 'SIP_RSWC_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/plugin.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sip-reviews-shortcode-woocommerce/public/plugin-reviews-avg.php:31
    • > PHP Warning
      Use of undefined constant SIP_SPWC_PLUGIN - assumed 'SIP_SPWC_PLUGIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-reviews-shortcode-woocommerce/admin/partials/ui/plugin.php on line 9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=sip-reviews-shortcode-settings
    • > Network (severe)
    wp-admin/admin.php?page=sip-reviews-shortcode-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=sip-extras
    • > Network (severe)
    wp-admin/admin.php?page=sip-extras - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

sip-reviews-shortcode-woocommerce/sip-reviews-shortcode-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "SIP Reviews Shortcode for WooCommerce" version 1.2.3
You should first fix the following items:
  • 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
  • Description: Keep the plugin description shorter than 140 characters (currently 222 characters long)

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
There were no executable files found in this plugin14,247 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,777
CSS51,439173,208
PHP243546511,813
JavaScript1011187449

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods4086.96%
▷ Protected methods00.00%
▷ Private methods613.04%
Functions20
▷ Named functions1890.00%
▷ Anonymous functions210.00%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.24MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/icon-advanced-email.png21.89KB9.25KB▼ 57.75%
admin/assets/images/aggregated.png10.32KB3.80KB▼ 63.17%
admin/assets/images/review-form.png48.28KB9.97KB▼ 79.35%
admin/assets/images/icon-social-proof.png8.71KB9.18KB0.00%
admin/assets/images/icon-reviews-shortcode.png7.81KB8.36KB0.00%