67% media-slider

Code Review | Media Slider - Photo Sleder, Video Slider, Link Slider, Carousal Slideshow

WordPress plugin Media Slider - Photo Sleder, Video Slider, Link Slider, Carousal Slideshow scored67%from 54 tests.

About plugin

  • Plugin page: media-slider
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 5, 2016
  • Latest release: Oct 20, 2023
  • Number of updates: 150
  • Update frequency: every 16.7 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

3,000+ active /111,825 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲2.53ms] 75% from 4 tests

Analyzing server-side resources used by Media Slider - Photo Sleder, Video Slider, Link Slider, Carousal Slideshow
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 649.10ms on /wp-admin/edit.php?post_type=media_slider&page=sr--media-featured-plugin-page)
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.46 ▲4.56
Dashboard /wp-admin3.45 ▲0.1558.34 ▼0.70
Posts /wp-admin/edit.php3.50 ▲0.1554.02 ▲3.98
Add New Post /wp-admin/post-new.php5.98 ▲0.09100.49 ▲11.68
Media Library /wp-admin/upload.php3.31 ▲0.0838.96 ▲2.26
All Media Slider /wp-admin/edit.php?post_type=media_slider3.3138.01
Add Media Slider /wp-admin/post-new.php?post_type=media_slider3.7860.78
Featured Plugin /wp-admin/edit.php?post_type=media_slider&page=sr--media-featured-plugin-page3.47649.10
Docs /wp-admin/edit.php?post_type=media_slider&page=sr-doc-page3.3138.10
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.3834.29
Our Theme /wp-admin/edit.php?post_type=media_slider&page=sr-theme-page3.3236.43

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 80 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Media Slider - Photo Sleder, Video Slider, Link Slider, Carousal Slideshow
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲18713.44 ▼0.938.65 ▲7.1038.58 ▼5.71
Dashboard /wp-admin2,275 ▲955.63 ▼0.0289.09 ▼11.2142.15 ▼2.03
Posts /wp-admin/edit.php2,189 ▲862.05 ▲0.0844.71 ▲4.3344.98 ▲9.55
Add New Post /wp-admin/post-new.php1,592 ▲6623.03 ▼0.20639.28 ▲0.4253.95 ▼11.74
Media Library /wp-admin/upload.php1,488 ▲884.24 ▼0.03113.27 ▲4.6453.87 ▲11.45
All Media Slider /wp-admin/edit.php?post_type=media_slider1,1701.9744.8740.88
Add Media Slider /wp-admin/post-new.php?post_type=media_slider3,0694.25114.20155.71
Featured Plugin /wp-admin/edit.php?post_type=media_slider&page=sr--media-featured-plugin-page3,4631.9335.69257.60
Docs /wp-admin/edit.php?post_type=media_slider&page=sr-doc-page9432.0431.5145.14
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0842.0625.5232.57
Our Theme /wp-admin/edit.php?post_type=media_slider&page=sr-theme-page1,0282.0730.7678.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=media_slider
    • > Notice in wp-content/plugins/media-slider/media-slider.php+110
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=media_slider
    • > Notice in wp-content/plugins/media-slider/media-slider.php+110
    Trying to access array offset on value of type null

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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/media-slider/docs.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/media-slider/featured-plugins/featured-plugins.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/media-slider/our-theme/awp-theme.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/media-slider/class-tgm-plugin-activation.php:2129

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=media_slider&page=sr--media-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/media-slider/js/featured-plugins/acl-media-upload-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/edit.php?post_type=media_slider&page=sr--media-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/media-slider/js/featured-plugins/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=media_slider&page=sr--media-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/media-slider/featured-plugins/fonts/bootstrap/glyphicons-halflings-regular-2.html - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=media_slider&page=sr--media-featured-plugin-page
    • > Network (severe)
    wp-content/plugins/media-slider/featured-plugins/fonts/bootstrap/glyphicons-halflings-regular-3.html - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=media_slider&page=sr-theme-page
    • > Network (severe)
    wp-content/plugins/media-slider/js/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: responsive slider, image slider, video slider, carousal slideshow, content slider

media-slider/media-slider.php Passed 13 tests

The main PHP file in "Media Slider - Photo Sleder, Video Slider, Link Slider, Carousal Slideshow" ver. 1.3.6 adds more information about the plugin and also serves as the entry point for this plugin
69 characters long description:
The best images slider plugin with image and video slideshow support.

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
Everything looks great! No dangerous files found in this plugin44,455 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS141,5962,26727,068
JavaScript82,1771,3267,357
SVG7005,923
PHP86291,7133,828
PO File1129142279

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity44.00
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods121
▷ Static methods54.13%
▷ Public methods9679.34%
▷ Protected methods2520.66%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/new-slide.png7.21KB2.40KB▼ 66.75%
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%