62% santa-cruz-savory

Code Review | Shop Ingredients Button

WordPress plugin Shop Ingredients Button scored62%from 54 tests.

About plugin

  • Plugin page: santa-cruz-savory
  • Plugin version: 0.5.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Feb 19, 2023
  • Number of updates: 9
  • Update frequency: every 20.0 days
  • Top authors: santacruzsavory (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /412 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.94MB] [CPU: ▼60.89ms] Passed 4 tests

A check of server-side resources used by Shop Ingredients Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.57 ▼37.20
Dashboard /wp-admin2.08 ▼1.265.75 ▼65.92
Posts /wp-admin/edit.php2.08 ▼1.277.20 ▼44.96
Add New Post /wp-admin/post-new.php2.08 ▼3.808.39 ▼95.48
Media Library /wp-admin/upload.php2.08 ▼1.154.77 ▼35.10
SantaCruzSavory /wp-admin/options-general.php?page=SantaCruzSavory2.086.27

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shop Ingredients Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲16713.59 ▼0.699.94 ▲8.2546.67 ▲4.34
Dashboard /wp-admin2,205 ▲255.82 ▲0.1493.25 ▼2.9942.01 ▼3.95
Posts /wp-admin/edit.php2,113 ▲132.04 ▲0.0340.56 ▼1.1035.50 ▼7.10
Add New Post /wp-admin/post-new.php1,538 ▲223.69 ▲5.42658.85 ▲5.3160.55 ▼10.43
Media Library /wp-admin/upload.php1,413 ▲134.27 ▲0.07106.67 ▲1.6844.98 ▲2.47
SantaCruzSavory /wp-admin/options-general.php?page=SantaCruzSavory8732.0930.9527.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=SantaCruzSavory
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=SantaCruzSavory
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the scs-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=SantaCruzSavory
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the scs-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/santa-cruz-savory/santaCruzSavoryPlugin.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=SantaCruzSavory
    • > Javascript (severe) in unknown
    https://assets.santacruzsavory.com/script.js?t=101915 0:3570 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #2 (Another screenshot of the button appearing below the list of ingredients.), #3 (When you click the button, this modal will popup.), #4 (You can configure the look and feel of the plugin in your Wordpress settings page.)
The official readme.txt is a good inspiration

santa-cruz-savory/santaCruzSavoryPlugin.php 92% from 13 tests

The entry point to "Shop Ingredients Button" version 0.5.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("santa-cruz-savory.php" instead of "santaCruzSavoryPlugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin109 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11922109

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected