78% sip-cookie-check-woocommerce

Code Review | SIP Cookie Check for WooCommerce

WordPress plugin SIP Cookie Check for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: sip-cookie-check-...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Jun 19, 2022
  • Number of updates: 16
  • Update frequency: every 154.8 days
  • Top authors: shopitpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,959 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.66ms] Passed 4 tests

Server-side resources used by SIP Cookie Check for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.93 ▼1.39
Dashboard /wp-admin3.33 ▼0.0143.31 ▼17.57
Posts /wp-admin/edit.php3.38 ▲0.0245.02 ▼3.41
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.75 ▼6.10
Media Library /wp-admin/upload.php3.25 ▲0.0229.66 ▼7.54
Cookie Check /wp-admin/admin.php?page=sip-cookie-check-settings3.3233.63
ShopitPress Extras /wp-admin/admin.php?page=sip-extras3.2731.48

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
sip_version_value
widget_recent-posts
sip_ccwc_message_editor
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for SIP Cookie Check for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17313.47 ▼1.067.47 ▲5.9040.01 ▲1.42
Dashboard /wp-admin2,247 ▲765.63 ▲0.0593.77 ▲8.8340.37 ▲2.49
Posts /wp-admin/edit.php2,152 ▲522.05 ▲0.0340.55 ▲4.6835.58 ▼2.84
Add New Post /wp-admin/post-new.php1,552 ▲2622.87 ▼0.30578.96 ▼69.9954.90 ▼1.69
Media Library /wp-admin/upload.php1,449 ▲524.27 ▲0.0695.75 ▼17.2641.00 ▼6.01
Cookie Check /wp-admin/admin.php?page=sip-cookie-check-settings1,6376.72132.8334.83
ShopitPress Extras /wp-admin/admin.php?page=sip-extras9452.0524.9424.01

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • sip_version_value
    • sip_ccwc_message_editor
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sip-cookie-check-settings
    • > Notice in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/affiliate.php+11
    Trying to access array offset on value of type bool

SRP 50% 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
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SIP_CCWC_PLUGIN_VERSION - assumed 'SIP_CCWC_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/plugin.php on line 7
    • > PHP Warning
      Use of undefined constant SIP_WPGUMBY_THEME - assumed 'SIP_WPGUMBY_THEME' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/themes.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/themes.php:9
    • > 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-cookie-check-woocommerce/admin/ui/plugin.php on line 8
    • > PHP Warning
      Use of undefined constant SIP_CCWC_PLUGIN_VERSION - assumed 'SIP_CCWC_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/themes.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/affiliate.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/help.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sip-cookie-check-woocommerce/includes/sip-cookie-check-woocommerce-functions.php:3
    • > PHP Warning
      Use of undefined constant SIP_CCWC_URL - assumed 'SIP_CCWC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/plugin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sip-cookie-check-woocommerce/admin/ui/plugin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

sip-cookie-check-woocommerce/sip-cookie-check-woocommerce.php 85% from 13 tests

The main PHP script in "SIP Cookie Check for WooCommerce" version 1.0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 145 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected773 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP999140416
CSS34011322
JavaScript17335

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.33
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
8 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/icon-front-end-bundler.png8.23KB8.70KB0.00%
admin/assets/images/icon-cookie-check.png21.19KB8.71KB▼ 58.89%
admin/assets/images/icon-wpgumby.png32.42KB34.75KB0.00%
admin/assets/images/icon-social-proof.png8.71KB9.18KB0.00%
admin/assets/images/icon-reviews-shortcode.png7.81KB8.36KB0.00%