83% awesome-widgets-for-siteorigin-page-builder

Code Review | Awesome Widgets for SiteOrigin Page Builder

WordPress plugin Awesome Widgets for SiteOrigin Page Builder scored83%from 54 tests.

About plugin

  • Plugin page: awesome-widgets-f...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.3
  • WordPress version: 6.3.1
  • First release: Mar 17, 2016
  • Latest release: Jan 24, 2020
  • Number of updates: 191
  • Update frequency: every 7.4 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /74,590 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Awesome Widgets for SiteOrigin Page Builder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.64 ▼6.04
Dashboard /wp-admin3.31 ▲0.0143.78 ▼5.65
Posts /wp-admin/edit.php3.37 ▲0.0145.86 ▼4.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.31 ▼8.93
Media Library /wp-admin/upload.php3.24 ▲0.0133.03 ▲0.74

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Awesome Widgets for SiteOrigin Page Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲13013.24 ▼1.051.94 ▲0.0434.80 ▼15.30
Dashboard /wp-admin2,221 ▲365.77 ▼0.1498.44 ▼15.2836.41 ▼7.23
Posts /wp-admin/edit.php2,113 ▲272.04 ▼0.0240.78 ▲5.2343.02 ▲10.04
Add New Post /wp-admin/post-new.php1,365 ▼15817.25 ▼5.83581.94 ▼96.1360.18 ▲1.72
Media Library /wp-admin/upload.php1,406 ▲184.22 ▼0.0197.45 ▼3.4444.54 ▼0.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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

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 take a closer look at the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/widgets/sale_off_widget/sale_off_widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/widgets/category_widget/category_widget.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/widgets/featured_widget/featured_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/widgets/top_seller_widget/top_seller_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-widgets-for-siteorigin-page-builder/widgets/new_arrival_widget/new_arrival_widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 80% 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:
  • Tags: There are too many tags (28 tag instead of maximum 10)
The official readme.txt is a good inspiration

awesome-widgets-for-siteorigin-page-builder/widget_activator.php 62% from 13 tests

This is the main PHP file of "Awesome Widgets for SiteOrigin Page Builder" version 3.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:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("awesome-widgets-for-siteorigin-page-builder.php" instead of "widget_activator.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 197 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "2.6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin4,798 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP119031,7553,075
JavaScript5219901,490
CSS21716233

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity34.83
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods121
▷ Static methods54.13%
▷ Public methods9880.99%
▷ Protected methods2319.01%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 compressed PNG files occupy 0.46MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assests/images/special-hover-wid.png28.60KB27.01KB▼ 5.58%
assests/images/demo-btn.png3.58KB2.59KB▼ 27.61%
assests/images/image-frame-odd.png0.90KB0.81KB▼ 10.31%
assests/images/new-arrival-wid.png22.57KB20.05KB▼ 11.15%
assests/images/interactive-banner-wid.png25.54KB24.70KB▼ 3.29%