10% sas-web-ads-banner-video

Code Review | SAS WEB ads-banner-video Plugin

WordPress plugin SAS WEB ads-banner-video Plugin scored10%from 54 tests.

About plugin

  • Plugin page: sas-web-ads-banne...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Sep 9, 2017
  • Number of updates: 13
  • Update frequency: every 75.7 days
  • Top authors: sureshHARDIYA (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /896 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/sas-web-ads-banner-video/libs/sidebar_full_banner_widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; SASWEB_full_Banner_widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼50.16ms] Passed 4 tests

An overview of server-side resources used by SAS WEB ads-banner-video Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.189.27 ▼33.40
Dashboard /wp-admin2.30 ▼1.0111.39 ▼39.26
Posts /wp-admin/edit.php2.30 ▼1.0611.82 ▼42.12
Add New Post /wp-admin/post-new.php2.30 ▼3.599.90 ▼85.85
Media Library /wp-admin/upload.php2.30 ▼0.9310.98 ▼25.38
Sidebar Ads Banner-video /wp-admin/options-general.php?page=sas-web-ads-banner-video/sidebar-ads-banner-video.php2.3011.13

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 9 new options
New WordPress options
widget_sasweb-full-video-widget
widget_sasweb-full-banner-widget
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_sasweb-half-banner-widget

Browser metrics Passed 4 tests

An overview of browser requirements for SAS WEB ads-banner-video Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.27 ▼1.282.17 ▲0.0845.06 ▲3.01
Dashboard /wp-admin2,207 ▲194.87 ▲0.01104.58 ▼5.3638.23 ▼4.61
Posts /wp-admin/edit.php2,093 ▲72.02 ▲0.0136.66 ▼1.1733.89 ▼1.40
Add New Post /wp-admin/post-new.php1,536 ▲323.13 ▲0.08663.11 ▼18.3957.93 ▼12.03
Media Library /wp-admin/upload.php1,386 ▲14.25 ▲0.09102.30 ▼1.8745.65 ▲4.76
Sidebar Ads Banner-video /wp-admin/options-general.php?page=sas-web-ads-banner-video/sidebar-ads-banner-video.php8252.0125.1032.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SASWEB_half_Banner_widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • widget_sasweb-full-banner-widget
    • widget_sasweb-full-video-widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_sasweb-half-banner-widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=sas-web-ads-banner-video/sidebar-ads-banner-video.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SASWEB_half_Banner_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=sas-web-ads-banner-video/sidebar-ads-banner-video.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SASWEB_full_Banner_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=sas-web-ads-banner-video/sidebar-ads-banner-video.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SASWEB_full_Video_Widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% 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 take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sas-web-ads-banner-video/libs/sidebar_full_video_banner_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sas-web-ads-banner-video/libs/sidebar_full_video_banner_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sas-web-ads-banner-video/libs/sidebar_help_instruction.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sas-web-ads-banner-video/libs/sidebar_full_banner_widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: sidebar ads, full width sidebar banner, half width sidebar, full width video sidebar

sas-web-ads-banner-video/sidebar-ads-banner-video.php 92% from 13 tests

Analyzing the main PHP file in "SAS WEB ads-banner-video Plugin" version 1.0.1
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sas-web-ads-banner-video.php" instead of "sidebar-ads-banner-video.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected423 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47540406
CSS10117

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity6.33
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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.18MB with 0.13MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/banner-772x250.png181.23KB50.47KB▼ 72.15%