83% image-slider-slideshow

Code Review | Image Slider Slideshow

WordPress plugin Image Slider Slideshow scored83%from 54 tests.

About plugin

  • Plugin page: image-slider-slid...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.2
  • WordPress version: 6.3.1
  • First release: Sep 25, 2020
  • Latest release: Apr 21, 2023
  • Number of updates: 13
  • Update frequency: every 72.2 days
  • Top authors: wptexture (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

5,000+ active /61,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.37MB] [CPU: ▼5.59ms] Passed 4 tests

An overview of server-side resources used by Image Slider Slideshow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3738.32 ▼2.55
Dashboard /wp-admin3.68 ▲0.3351.60 ▼12.68
Posts /wp-admin/edit.php3.79 ▲0.4349.41 ▲5.98
Add New Post /wp-admin/post-new.php6.33 ▲0.4484.22 ▼13.09
Media Library /wp-admin/upload.php3.60 ▲0.3749.94 ▲18.29
Upgrade To Premium /wp-admin/edit.php?post_type=img_slider&page=imgs-premium3.5832.73
Galleries /wp-admin/edit.php?post_type=img_slider3.6535.64
Add New /wp-admin/post-new.php?post_type=img_slider3.7149.68

Server storage [IO: ▲6.37MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 136 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
rpg-slider-images-default
img-slider-v
img-slider-type
db_upgraded
theysaidso_admin_options
can_compress_scripts
img-slider-installDate
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Image Slider Slideshow
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲26816.60 ▲1.8812.29 ▲10.6538.98 ▼5.98
Dashboard /wp-admin2,277 ▲1006.27 ▲0.69126.68 ▲23.9137.81 ▼6.06
Posts /wp-admin/edit.php2,163 ▲633.81 ▲1.8084.12 ▲46.7533.62 ▲1.67
Add New Post /wp-admin/post-new.php1,594 ▲6824.55 ▲1.43709.83 ▲60.8737.13 ▼13.85
Media Library /wp-admin/upload.php1,579 ▲1825.79 ▲1.58133.70 ▲33.7441.65 ▼3.01
Upgrade To Premium /wp-admin/edit.php?post_type=img_slider&page=imgs-premium1,3493.6063.0951.51
Galleries /wp-admin/edit.php?post_type=img_slider1,1563.6246.0244.80
Add New /wp-admin/post-new.php?post_type=img_slider4,0177.29202.48129.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • img-slider-type
    • theysaidso_admin_options
    • db_upgraded
    • img-slider-installDate
    • can_compress_scripts
    • widget_theysaidso_widget
    • rpg-slider-images-default
    • img-slider-v

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/image-slider-slideshow/image-slider.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-slider-slideshow/includes/admin/class-img-slider-admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/image-slider-slideshow/includes/public/templates/image-slider.php:3
    • > PHP Fatal error
      require(): Failed opening required 'IMG_SLIDER_LIBRARIESclass-gamajo-template-loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/image-slider-slideshow/includes/libraries/class-img-slider-template-loader.php on line 4
    • > PHP Warning
      include(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/image-slider-slideshow/default_image.php on line 15
    • > PHP Warning
      require(IMG_SLIDER_LIBRARIESclass-gamajo-template-loader.php): failed to open stream: No such file or directory in wp-content/plugins/image-slider-slideshow/includes/libraries/class-img-slider-template-loader.php on line 4
    • > PHP Warning
      Use of undefined constant IMG_SLIDER_IMAGES - assumed 'IMG_SLIDER_IMAGES' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-slider-slideshow/default_image.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Img_Slider_Template_Loader' not found in wp-content/plugins/image-slider-slideshow/includes/public/class-img-slider-shortcode.php:13
    • > PHP Warning
      Use of undefined constant IMG_SLIDER_IMAGES - assumed 'IMG_SLIDER_IMAGES' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-slider-slideshow/default_image.php on line 3
    • > PHP Warning
      Use of undefined constant IMG_SLIDER_LIBRARIES - assumed 'IMG_SLIDER_LIBRARIES' (this will throw an Error in a future version of PHP) in wp-content/plugins/image-slider-slideshow/includes/libraries/class-img-slider-template-loader.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6 in image-slider-slideshow/assets to your readme.txt
  • Donate link: Invalid url: "#"
You can look at the official readme.txt

image-slider-slideshow/image-slider.php 85% from 13 tests

This is the main PHP file of "Image Slider Slideshow" version 1.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("image-slider-slideshow.php" instead of "image-slider.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected28,562 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
CSS213,8509,3289,827
JavaScript156053056,126
SVG50135,563
PHP259937643,273
Sass1643341,903
LESS1641511,870

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.90
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods62
▷ Static methods812.90%
▷ Public methods4775.81%
▷ Protected methods34.84%
▷ Private methods1219.35%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sprites.png0.41KB0.44KB0.00%
assets/images/next.png1.32KB1.58KB0.00%
assets/images/prev.png1.33KB1.59KB0.00%
assets/images/dark.png8.35KB14.08KB0.00%
assets/images/close.png0.27KB0.29KB0.00%