78% so-widgets-bundle

Code Review | SiteOrigin Widgets Bundle

WordPress plugin SiteOrigin Widgets Bundle scored78%from 54 tests.

About plugin

  • Plugin page: so-widgets-bundle
  • Plugin version: 1.57.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Jun 1, 2014
  • Latest release: Nov 24, 2023
  • Number of updates: 404
  • Update frequency: every 8.6 days
  • Top authors: gpriday (58.17%)SiteOrigin (42.08%)

Code review

54 tests

User reviews

129 reviews

Install metrics

600,000+ active /36,489,706 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.48MB] [CPU: ▲11.46ms] 75% from 4 tests

This is a short check of server-side resources used by SiteOrigin Widgets Bundle
Please take the time to fix the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 4,769.71ms on /wp-admin/admin.php?page=siteorigin-installer)
PageMemory (MB)CPU Time (ms)
Home /4.91 ▲1.4458.26 ▲20.31
Dashboard /wp-admin4.78 ▲1.4857.89 ▲3.62
Posts /wp-admin/edit.php4.90 ▲1.5455.78 ▲8.25
Add New Post /wp-admin/post-new.php9.58 ▲3.69142.48 ▲55.94
Media Library /wp-admin/upload.php4.70 ▲1.4745.52 ▲13.66
SiteOrigin Widgets /wp-admin/plugins.php?page=so-widgets-plugins6.6459.83
Installer /wp-admin/admin.php?page=siteorigin-installer5.244,769.71

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 682 new files
Database: no new tables, 14 new options
New WordPress options
widget_sow-image
widget_sow-google-map
widget_sow-post-carousel
widget_recent-posts
widget_sow-editor
widget_sow-button
siteorigin_widget_bundle_version
theysaidso_admin_options
widget_sow-slider
db_upgraded
...

Browser metrics Passed 4 tests

SiteOrigin Widgets Bundle: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲4914.34 ▲0.101.72 ▲0.0142.60 ▼0.42
Dashboard /wp-admin2,213 ▲355.58 ▼0.0784.20 ▼41.5741.36 ▼2.29
Posts /wp-admin/edit.php2,122 ▲251.98 ▼0.0139.26 ▲1.3136.07 ▲2.34
Add New Post /wp-admin/post-new.php6,308 ▲4,78219.17 ▼3.85957.22 ▲355.3737.57 ▼27.43
Media Library /wp-admin/upload.php1,424 ▲244.28 ▲0.0498.11 ▼4.1343.88 ▲4.03
SiteOrigin Widgets /wp-admin/plugins.php?page=so-widgets-plugins2,9925.1872.90167.79
Installer /wp-admin/admin.php?page=siteorigin-installer1,3152.2726.4140.29

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 14 options
    • theysaidso_admin_options
    • widget_sow-editor
    • widget_sow-image
    • siteorigin_widget_bundle_version
    • widget_sow-button
    • siteorigin_widgets_old_widgets
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_sow-post-carousel
    • ...

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/so-widgets-bundle/widgets/social-media-buttons/tpl/default.php
    • > /wp-content/plugins/so-widgets-bundle/widgets/editor/tpl/default.php
    • > /wp-content/plugins/so-widgets-bundle/widgets/accordion/tpl/default.php
    • > /wp-content/plugins/so-widgets-bundle/widgets/features/tpl/default.php
    • > /wp-content/plugins/so-widgets-bundle/widgets/tabs/tpl/default.php
    • > /wp-content/plugins/so-widgets-bundle/widgets/headline/tpl/default.php
    • > /wp-content/plugins/so-widgets-bundle/widgets/price-table/tpl/atom.php
  • 227× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/so-widgets-bundle/base/inc/widgets/base-slider.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/so-widgets-bundle/base/inc/lib/Less/Tree/Value.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/so-widgets-bundle/base/inc/lib/Less/Tree/Import.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/so-widgets-bundle/widgets/features/tpl/default.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget_Field_Base' not found in wp-content/plugins/so-widgets-bundle/base/inc/fields/media.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget_Field_Container_Base' not found in wp-content/plugins/so-widgets-bundle/base/inc/fields/section.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/so-widgets-bundle/base/inc/lib/Less/Tree/Alpha.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/so-widgets-bundle/base/inc/lib/Less/Tree/Rule.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/so-widgets-bundle/icons/typicons/filter.php:343
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/so-widgets-bundle/widgets/button/tpl/default.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

so-widgets-bundle/so-widgets-bundle.php Passed 13 tests

Analyzing the main PHP file in "SiteOrigin Widgets Bundle" version 1.57.0
108 characters long description:
A highly customizable collection of widgets, ready to be used anywhere, neatly bundled into a single plugin.

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
There were no executable files found in this plugin91,034 lines of code in 604 files:
LanguageFilesBlank linesComment linesLines of code
PHP2156,2185,16047,498
JavaScript2465,6465,10624,261
SVG591412,465
LESS369121684,583
CSS42165151,307
XML100443
JSON200434
Markdown325043

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity28.22
▷ Minimum class complexity1.00
▷ Maximum class complexity442.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes158
▷ Abstract classes85.06%
▷ Concrete classes15094.94%
▷ Final classes00.00%
Methods1,367
▷ Static methods987.17%
▷ Public methods1,01474.18%
▷ Protected methods21515.73%
▷ Private methods13810.10%
Functions58
▷ Named functions5696.55%
▷ Anonymous functions23.45%
Constants28
▷ Global constants725.00%
▷ Class constants2175.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
base/css/img/arrow-right.png0.14KB0.20KB0.00%
base/css/img/order-asc.png0.29KB0.38KB0.00%
base/css/img/close.png0.17KB0.27KB0.00%
base/css/img/thumbnail-placeholder.png0.09KB0.09KB0.00%
admin/images/icon-gear.png0.87KB1.23KB0.00%