78% wp-widget-bundle

Code Review | Widget Bundle

WordPress plugin Widget Bundle scored78%from 54 tests.

About plugin

  • Plugin page: wp-widget-bundle
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Aug 7, 2015
  • Latest release: Sep 28, 2020
  • Number of updates: 75
  • Update frequency: every 25.1 days
  • Top authors: devnath verma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,945 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.02MB] [CPU: ▼5.09ms] Passed 4 tests

An overview of server-side resources used by Widget Bundle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.23 ▼3.27
Dashboard /wp-admin3.32 ▲0.0244.81 ▼4.74
Posts /wp-admin/edit.php3.37 ▲0.0243.77 ▲0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0278.50 ▼12.61
Media Library /wp-admin/upload.php3.25 ▲0.0237.56 ▲4.80

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget Bundle
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲5113.25 ▼1.061.70 ▼0.1729.10 ▼14.86
Dashboard /wp-admin2,226 ▲385.94 ▲1.0496.25 ▼19.2946.93 ▲3.31
Posts /wp-admin/edit.php2,109 ▲202.05 ▼0.0135.19 ▼7.7239.87 ▲8.20
Add New Post /wp-admin/post-new.php1,694 ▲17525.01 ▲1.74618.65 ▼76.2465.83 ▲9.64
Media Library /wp-admin/upload.php1,408 ▲174.25 ▼0.0297.85 ▼4.5248.79 ▲2.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-widget-bundle/widget-bundle.php
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-widget-bundle/includes/widget-form/widget-categories-form.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-widget-bundle/includes/widget-form/widget-login-register-form.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-widget-bundle/includes/widget/class-comments-widget.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-widget-bundle/includes/widget/class-social-widget.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-widget-bundle/includes/widget/class-posts-widget.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-widget-bundle/includes/widget/class-contact-widget.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-widget-bundle/includes/widget-form/widget-button-form.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-widget-bundle/includes/widget-form/widget-aboutme-form.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-widget-bundle/admin/view/widget-types.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-widget-bundle/includes/widget-form/widget-text-form.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: post, widget, image, button, social

wp-widget-bundle/widget-bundle.php 77% from 13 tests

The main PHP script in "Widget Bundle" version 2.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-widget-bundle.php" instead of "widget-bundle.php")
  • Description: The description should be shorter than 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin14,128 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,325259,908
PHP369621,7863,992
JavaScript99372228

PHP code Passed 2 tests

This is a very shot review of 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.22
Average class complexity23.90
▷ Minimum class complexity1.00
▷ Maximum class complexity90.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods105
▷ Static methods87.62%
▷ Public methods105100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/delete-icon.png18.37KB8.39KB▼ 54.31%