74% image-responsive-slider

Code Review | Image Responsive Slider

WordPress plugin Image Responsive Slider scored74%from 54 tests.

About plugin

  • Plugin page: image-responsive-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.8
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Jul 27, 2021
  • Number of updates: 3
  • Update frequency: every 160.7 days
  • Top authors: corefortress (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /11,704 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼15.60ms] Passed 4 tests

An overview of server-side resources used by Image Responsive Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.76 ▼6.06
Dashboard /wp-admin3.51 ▲0.1654.98 ▼15.52
Posts /wp-admin/edit.php3.62 ▲0.2652.98 ▲0.87
Add New Post /wp-admin/post-new.php5.02 ▼0.8759.84 ▼41.67
Media Library /wp-admin/upload.php3.43 ▲0.2041.55 ▲4.94
Sliders /wp-admin/admin.php?page=corefortress_slider_sliders3.4041.10
Themes /wp-admin/admin.php?page=corefortress_slider_themes3.4145.87

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 81 new files
Database: 3 new tables, 7 new options
New tables
wp_corefortress_sliders
wp_corefortress_slider_themes
wp_corefortress_slides
New WordPress options
corefortress_slider_version
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Image Responsive Slider: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.72 ▲0.351.82 ▲0.1040.70 ▼8.54
Dashboard /wp-admin2,226 ▲495.56 ▼0.2985.67 ▼6.4881.14 ▲36.86
Posts /wp-admin/edit.php2,128 ▲251.99 ▼0.0136.13 ▼2.6934.89 ▲0.33
Add New Post /wp-admin/post-new.php6,389 ▲4,86327.39 ▲4.42904.49 ▲254.9739.52 ▼10.50
Media Library /wp-admin/upload.php1,428 ▲254.11 ▼0.04107.73 ▲5.4983.88 ▲37.94
Sliders /wp-admin/admin.php?page=corefortress_slider_sliders8672.1543.3528.54
Themes /wp-admin/admin.php?page=corefortress_slider_themes9882.1235.1340.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables detected upon uninstall: 3 tables
    • wp_corefortress_sliders
    • wp_corefortress_slides
    • wp_corefortress_slider_themes
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • corefortress_slider_version
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 110× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/image-responsive-slider/views/front/shortcode.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/image-responsive-slider/views/admin/edit-post-slide.php:27
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/image-responsive-slider/views/front/shortcode.php on line 59
    • > PHP Notice
      Trying to get property 'media_image_id' of non-object in wp-content/plugins/image-responsive-slider/views/admin/edit-video-slide.php on line 24
    • > PHP Notice
      Undefined variable: slide in wp-content/plugins/image-responsive-slider/views/admin/edit-video-slide.php on line 8
    • > PHP Notice
      Trying to get property 'sort_order' of non-object in wp-content/plugins/image-responsive-slider/views/admin/edit-video-slide.php on line 10
    • > PHP Notice
      Undefined variable: slide in wp-content/plugins/image-responsive-slider/views/admin/edit-video-slide.php on line 22
    • > PHP Notice
      Trying to get property 'grabCursor' of non-object in wp-content/plugins/image-responsive-slider/views/front/shortcode.php on line 37
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/image-responsive-slider/views/admin/edit-image-slide.php on line 8
    • > PHP Notice
      Undefined variable: slide in wp-content/plugins/image-responsive-slider/views/admin/edit-post-slide.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: image slider, slider, responsive slider

image-responsive-slider/index.php 85% from 13 tests

"Image Responsive Slider" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Main file name: Name the main plugin file the same as the plugin slug ("image-responsive-slider.php" instead of "index.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
Good job! No executable or dangerous file extensions detected12,657 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript57703998,205
PHP273732773,028
CSS5110471,144
SVG3403264
JSON2008
Markdown1308

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity19.10
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods55
▷ Static methods59.09%
▷ Public methods4989.09%
▷ Protected methods23.64%
▷ Private methods47.27%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/admin-icon.png1.73KB0.92KB▼ 47.18%
assets/img/logo.png5.02KB2.28KB▼ 54.49%