84% free-shipping-bar-widget-for-elementor

Code Review | Free Shipping Bar Widget

WordPress plugin Free Shipping Bar Widget scored84%from 54 tests.

About plugin

  • Plugin page: free-shipping-bar...
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2023
  • Latest release: Feb 22, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: creatoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /556 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 gracefully, with no errors

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

This is a short check of server-side resources used by Free Shipping Bar Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.90 ▲1.42
Dashboard /wp-admin3.31 ▲0.0143.77 ▼2.79
Posts /wp-admin/edit.php3.36 ▲0.0042.26 ▼8.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.97 ▼8.28
Media Library /wp-admin/upload.php3.23 ▲0.0034.01 ▼0.21

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Free Shipping Bar Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.17 ▼1.211.84 ▼0.0243.38 ▲0.28
Dashboard /wp-admin2,209 ▲185.89 ▲1.0297.44 ▼36.6337.70 ▼20.63
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0138.22 ▼5.1031.90 ▼2.24
Add New Post /wp-admin/post-new.php1,514 ▼517.68 ▼5.50658.53 ▼15.4452.07 ▼10.94
Media Library /wp-admin/upload.php1,391 ▲64.25 ▲0.0297.45 ▼2.4840.84 ▼0.25

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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-shipping-bar-widget-for-elementor/free-shipping-bar-widget.php:14

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 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
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (The amount to free shipping is displayed), #2 (Choose the text and colors when the shipping is free or paid), #3 (You can easily change settings of the widget)
Please take inspiration from this readme.txt

free-shipping-bar-widget-for-elementor/free-shipping-bar-widget.php 92% from 13 tests

This is the main PHP file of "Free Shipping Bar Widget" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("free-shipping-bar-widget-for-elementor.php" instead of "free-shipping-bar-widget.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 plugin235 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2611165
JavaScript181059
CSS10011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods225.00%
▷ Private methods112.50%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin