67% livemesh-siteorigin-widgets

Code Review | Livemesh SiteOrigin Widgets

WordPress plugin Livemesh SiteOrigin Widgets scored67%from 54 tests.

About plugin

  • Plugin page: livemesh-siteorig...
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: Nov 15, 2023
  • Number of updates: 118
  • Update frequency: every 24.3 days
  • Top authors: livemesh (100%)

Code review

54 tests

User reviews

97 reviews

Install metrics

20,000+ active /1,055,015 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲5.03MB] [CPU: ▲19.45ms] 75% from 4 tests

Analyzing server-side resources used by Livemesh SiteOrigin Widgets
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.03MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4259.35 ▲16.40
Dashboard /wp-admin8.90 ▲5.5675.90 ▲15.19
Posts /wp-admin/edit.php8.90 ▲5.54117.63 ▲73.77
Add New Post /wp-admin/post-new.php9.47 ▲3.59111.75 ▲13.35
Media Library /wp-admin/upload.php8.90 ▲5.6765.82 ▲32.87
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.9057.30

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 448 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
fs_accounts
fs_active_plugins
widget_theysaidso_widget
theysaidso_admin_options
fs_debug_mode
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Livemesh SiteOrigin Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16213.42 ▼1.228.82 ▲7.2627.20 ▼15.63
Dashboard /wp-admin2,224 ▲525.55 ▼0.0295.96 ▼63.8582.40 ▲22.28
Posts /wp-admin/edit.php2,136 ▲361.96 ▼0.0643.70 ▲4.0936.21 ▲2.21
Add New Post /wp-admin/post-new.php1,544 ▲1822.21 ▼0.92776.42 ▲68.9050.94 ▼1.36
Media Library /wp-admin/upload.php1,432 ▲324.22 ▲0.0297.43 ▼8.6874.45 ▲32.49
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0901.6624.6330.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/livemesh-siteorigin-widgets/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • fs_accounts
    • fs_active_plugins
    • db_upgraded
    • fs_debug_mode
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-team-members-widget/tpl/social-profile.php
  • 71× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: team_member in wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-team-members-widget/tpl/social-profile.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-portfolio-widget/lsow-portfolio-widget.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-hero-image-widget/tpl/default.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-hero-image-widget/tpl/default.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_attachment_image_src() in wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-hero-image-widget/tpl/default.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-icon-list-widget/lsow-icon-list-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget_Field_Text_Input_Base' not found in wp-content/plugins/livemesh-siteorigin-widgets/includes/fields/notify.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-clients-widget/lsow-clients-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget_Field_Text_Input_Base' not found in wp-content/plugins/livemesh-siteorigin-widgets/includes/fields/datepicker.class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/livemesh-siteorigin-widgets/templates/post-meta/author.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% 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:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

livemesh-siteorigin-widgets/livemesh-siteorigin-widgets.php 77% from 13 tests

"Livemesh SiteOrigin Widgets" version 3.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin90,120 lines of code in 355 files:
LanguageFilesBlank linesComment linesLines of code
PHP1829,79217,78841,100
PO File148,41710,79918,381
JavaScript613,3813,94315,098
CSS449491818,503
Sass2559125,999
SVG19318848
LESS9441175
XML13016

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity61.89
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes75
▷ Abstract classes34.00%
▷ Concrete classes7296.00%
▷ Final classes22.78%
Methods1,394
▷ Static methods20014.35%
▷ Public methods98670.73%
▷ Protected methods312.22%
▷ Private methods37727.04%
Functions125
▷ Named functions12499.20%
▷ Anonymous functions10.80%
Constants158
▷ Global constants11170.25%
▷ Class constants4729.75%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/logo-light.png4.88KB2.62KB▼ 46.19%
includes/fields/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
includes/fields/css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
admin/assets/images/logo-shape.png3.02KB1.63KB▼ 45.87%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%