78% vikwidgetsloader

Code Review | VikWidgetsLoader - Collection of Widgets

WordPress plugin VikWidgetsLoader - Collection of Widgets scored78%from 54 tests.

About plugin

  • Plugin page: vikwidgetsloader
  • Plugin version: 1.10.1
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: May 2, 2018
  • Latest release: Dec 6, 2022
  • Number of updates: 20
  • Update frequency: every 84.0 days
  • Top authors: e4jvikwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /5,700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.89ms] Passed 4 tests

Server-side resources used by VikWidgetsLoader - Collection of Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2346.18 ▲7.18
Dashboard /wp-admin3.62 ▲0.2752.55 ▼0.10
Posts /wp-admin/edit.php3.67 ▲0.2754.39 ▲0.18
Add New Post /wp-admin/post-new.php6.14 ▲0.2188.52 ▼11.20
Media Library /wp-admin/upload.php3.48 ▲0.2143.77 ▲3.55
VikWidgetsLoader /wp-admin/options-general.php?page=vikwidgetsloader3.4432.51

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 113 new files
Database: no new tables, 17 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_vikwp_customtext
widget_vikwp_counter
widget_vikwp_cookiespolicy
widget_vikwp_googlemaps
widget_vikwp_tripadvisoreview
widget_vikwp_textslide
widget_vikwp_icons
...

Browser metrics Passed 4 tests

A check of browser resources used by VikWidgetsLoader - Collection of Widgets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15413.75 ▼0.657.48 ▲4.7041.64 ▼2.90
Dashboard /wp-admin2,193 ▲135.55 ▼0.1388.96 ▼0.3039.12 ▼3.21
Posts /wp-admin/edit.php2,101 ▲11.94 ▼0.0837.75 ▼2.2039.61 ▲0.95
Add New Post /wp-admin/post-new.php1,369 ▼16816.52 ▼1.44562.49 ▼57.5547.81 ▼18.32
Media Library /wp-admin/upload.php1,407 ▲44.27 ▲0.0698.27 ▲2.6544.05 ▲3.05
VikWidgetsLoader /wp-admin/options-general.php?page=vikwidgetsloader1,0361.9923.3432.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 17 options in the database
    • widget_vikwp_customtext
    • theysaidso_admin_options
    • widget_vikwp_googlemaps
    • widget_vikwp_gridcontent
    • db_upgraded
    • widget_vikwp_category_post
    • widget_vikwp_icons
    • can_compress_scripts
    • widget_vikwp_cookiespolicy
    • widget_vikwp_counter
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
  • 40× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/vikwidgetsloader/widgets/vikwp_category_post/tmpl/form.php
    • > /wp-content/plugins/vikwidgetsloader/constants.php
    • > /wp-content/plugins/vikwidgetsloader/widgets/vikwp_customtext/tmpl/widget.php
    • > /wp-content/plugins/vikwidgetsloader/widgets/vikwp_customtext/vikwp_customtext.php
    • > /wp-content/plugins/vikwidgetsloader/libraries/functions.php
    • > /wp-content/plugins/vikwidgetsloader/widgets/vikwp_category_post/vikwp_category_post.php
    • > /wp-content/plugins/vikwidgetsloader/widgets/vikwp_speakers/tmpl/form.php
    • > /wp-content/plugins/vikwidgetsloader/widgets/vikwp_textslide/vikwp_textslide.php
    • > /wp-content/plugins/vikwidgetsloader/vikwidgetsloader.php
    • > /wp-content/plugins/vikwidgetsloader/widgets/vikwp_counter/vikwp_counter.php
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/form.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 25
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 101
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 36
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 38
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 36
    • > PHP Warning
      array_key_exists() expects parameter 2 to be array, unknown given in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 41
    • > PHP Notice
      Undefined index: in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 33
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 31
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/vikwidgetsloader/widgets/vikwp_googlemaps/tmpl/widget.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7 in vikwidgetsloader/assets to your readme.txt
You can take inspiration from this readme.txt

vikwidgetsloader/vikwidgetsloader.php Passed 13 tests

The main file in "VikWidgetsLoader - Collection of Widgets" v. 1.10.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
36 characters long description:
Plugin used to load several Widgets.

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
Good job! No executable or dangerous file extensions detected26,857 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
CSS2670518712,569
SVG50128,779
PHP424664763,599
JavaScript76022251,660
Markdown4750237
JSON10013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.71
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods43
▷ Static methods818.60%
▷ Public methods4093.02%
▷ Protected methods36.98%
▷ Private methods00.00%
Functions11
▷ Named functions763.64%
▷ Anonymous functions436.36%
Constants6
▷ Global constants6100.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
11 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
widgets/vikwp_category_post/vikwp_category_post.png3.70KB1.47KB▼ 60.10%
widgets/vikwp_tripadvisorreview/vikwp_tripadvisorreview.png5.88KB2.45KB▼ 58.43%
widgets/vikwp_googlemaps/vikwp_googlemaps.png4.51KB1.86KB▼ 58.65%
widgets/vikwp_icons/vikwp_icons.png19.76KB1.42KB▼ 92.83%
widgets/vikwp_speakers/vikwp_speakers.png3.98KB1.62KB▼ 59.23%