57% sherk-carousel-banners

Code Review | Sherk Carousel Banners Plugin

WordPress plugin Sherk Carousel Banners Plugin scored57%from 54 tests.

About plugin

  • Plugin page: sherk-carousel-ba...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: May 16, 2015
  • Number of updates: 7
  • Update frequency: every 1.1 days
  • Top authors: sherkspear (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,066 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.61MB] [CPU: ▼53.86ms] Passed 4 tests

Server-side resources used by Sherk Carousel Banners Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.39 ▼1.0810.49 ▼31.05
Dashboard /wp-admin2.40 ▼0.9013.45 ▼43.54
Posts /wp-admin/edit.php2.40 ▼0.9610.96 ▼39.56
Add New Post /wp-admin/post-new.php2.40 ▼3.4913.16 ▼101.27
Media Library /wp-admin/upload.php2.40 ▼0.8311.73 ▼24.05
How To Use /wp-admin/edit.php?post_type=sherk_banners&page=sherkbanners_info2.4014.15
Add New /wp-admin/post-new.php?post_type=sherk_banners2.4013.21
Banners Category /wp-admin/edit-tags.php?taxonomy=sherk_banners_cat&post_type=sherk_banners2.4013.62
Sherk Banners /wp-admin/edit.php?post_type=sherk_banners2.4012.81
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sherk_banners2.4011.98

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_sherk_banners_widget_id
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Sherk Carousel Banners Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲18213.75 ▼0.989.00 ▲7.2346.45 ▲4.25
Dashboard /wp-admin2,237 ▲575.62 ▼0.0386.39 ▼7.0536.09 ▼1.53
Posts /wp-admin/edit.php2,142 ▲422.03 ▲0.0434.13 ▼3.5735.97 ▲0.29
Add New Post /wp-admin/post-new.php1,555 ▲2923.60 ▲0.44686.34 ▲27.7437.27 ▼16.22
Media Library /wp-admin/upload.php1,442 ▲454.18 ▼0.0394.36 ▼8.1742.93 ▼2.96
How To Use /wp-admin/edit.php?post_type=sherk_banners&page=sherkbanners_info1,2422.0325.1939.25
Add New /wp-admin/post-new.php?post_type=sherk_banners2,4938.02188.0372.42
Banners Category /wp-admin/edit-tags.php?taxonomy=sherk_banners_cat&post_type=sherk_banners1,3102.1227.9232.54
Sherk Banners /wp-admin/edit.php?post_type=sherk_banners1,1281.9630.9130.30
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sherk_banners1,3552.2528.8831.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SherkBannersWidget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_sherk_banners_widget_id
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sherk_banners
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SherkBannersWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sherk_banners
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sherk-carousel-banners/templates/sherkbanners_dashboard.php
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'SherkBanners' not found in wp-content/plugins/sherk-carousel-banners/templates/sherkbanners_dashboard.php:111
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-carousel-banners/includes/SherkBannersMetaBox.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-carousel-banners/includes/SherkBannersHelper.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-carousel-banners/includes/SherkBannersCssJsScripts.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_terms() in wp-content/plugins/sherk-carousel-banners/templates/single-sherk_banners-content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-carousel-banners/includes/SherkBannersMenu.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-carousel-banners/includes/CPT_SherkBanners.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sherk-carousel-banners/includes/SherkBannersShortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sherk-carousel-banners/includes/SherkBannersCssJsScripts.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sherk-carousel-banners/includes/SherkBannersWidget.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=sherk_banners
    • > Network (severe)
    wp-content/plugins/my-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=sherk_banners
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=sherk_banners 0:0 Uncaught SyntaxError: Unexpected end of JSON input

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: carousel, slideshow, bxslider, banner, shortcode...

sherk-carousel-banners/sherk_banners.php 92% from 13 tests

"Sherk Carousel Banners Plugin" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sherk-carousel-banners.php" instead of "sherk_banners.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 detected1,901 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3105470971
PHP1022599646
CSS34722202
Markdown134082

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.12
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/controls.png2.74KB1.42KB▼ 48.29%
assets/img/glyphicons.png108.59KB52.69KB▼ 51.48%
assets/css/images/controls.png2.74KB1.42KB▼ 48.29%
assets/img/glyphicons-halflings.png13.50KB10.35KB▼ 23.34%
assets/images/logo.png49.81KB14.78KB▼ 70.33%