10% sidebar-image-banner-ads-widget

Code Review | Sidebar Image Banner Ads Widget

WordPress plugin Sidebar Image Banner Ads Widget scored10%from 54 tests.

About plugin

  • Plugin page: sidebar-image-ban...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Sep 9, 2017
  • Number of updates: 19
  • Update frequency: every 60.6 days
  • Top authors: sureshHARDIYA (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /17,353 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sidebar-image-banner-ads-widget/sidebar_image_banner_ads.php+288
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼57.24ms] Passed 4 tests

An overview of server-side resources used by Sidebar Image Banner Ads Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.44 ▼38.95
Dashboard /wp-admin2.05 ▼1.305.48 ▼65.87
Posts /wp-admin/edit.php2.05 ▼1.319.75 ▼40.59
Add New Post /wp-admin/post-new.php2.05 ▼3.847.06 ▼83.56
Media Library /wp-admin/upload.php2.05 ▼1.185.91 ▼28.21

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

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

Browser metrics Passed 4 tests

Sidebar Image Banner Ads Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.15 ▼1.221.77 ▼0.0743.57 ▲0.15
Dashboard /wp-admin2,225 ▲255.90 ▲0.94109.06 ▼41.1143.34 ▼6.89
Posts /wp-admin/edit.php2,121 ▲422.25 ▲0.1939.93 ▲4.6342.88 ▲8.74
Add New Post /wp-admin/post-new.php1,534 ▲823.07 ▲5.53655.60 ▼26.8055.38 ▲3.06
Media Library /wp-admin/upload.php1,411 ▲84.23 ▲0.0295.86 ▼9.4643.51 ▼2.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/sidebar-image-banner-ads-widget/sidebar_image_banner_ads.php+288
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_banner
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sidebar-image-banner-ads-widget/sidebar_image_banner_ads.php:16

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (plugin search listing), #2 (plugin_dashboard_listing.png), #3 (sidebar widget settings), #4 (advance configuration of the sidebar image plugin)
The official readme.txt is a good inspiration

sidebar-image-banner-ads-widget/sidebar_image_banner_ads.php 92% from 13 tests

"Sidebar Image Banner Ads Widget" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sidebar-image-banner-ads-widget.php" instead of "sidebar_image_banner_ads.php")

Code Analysis Passed 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 plugin259 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14935214
CSS15436
JavaScript1049

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity7.60
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
previewbackground.png0.41KB0.27KB▼ 34.20%
advanced_configuration.png46.73KB14.38KB▼ 69.21%
plugin-dashboard.png28.37KB8.58KB▼ 69.75%
plugin-listing.png61.68KB19.06KB▼ 69.10%
widget-sidebar.png100.49KB31.05KB▼ 69.10%