78% all-image-sliders-in-one

Code Review | all-image-sliders-in-one

WordPress plugin all-image-sliders-in-one scored 78% from 54 tests.

About plugin

  • Plugin page: all-image-sliders...
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.3-5.6
  • WordPress version: 5.8.1
  • First release: Dec 8, 2020
  • Latest release: Dec 13, 2020
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: saeedhanafi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼143.32ms] Passed 4 tests

Analyzing server-side resources used by all-image-sliders-in-one
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0432.77 ▼4.15
Dashboard /wp-admin3.20 ▲0.1451.29 ▼7.91
Posts /wp-admin/edit.php3.28 ▲0.1751.68 ▲1.13
Add New Post /wp-admin/post-new.php5.56 ▲0.13108.08 ▼562.36
Media Library /wp-admin/upload.php3.14 ▲0.1440.89 ▲7.17
Add New /wp-admin/post-new.php?post_type=shisp-image-slider3.2049.30
All Sliders /wp-admin/edit.php?post_type=shisp-image-slider3.1841.85
Subjects /wp-admin/edit-tags.php?taxonomy=shisp-sliders-subject&post_type=shisp-image-slider3.1426.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, 1 new option
New WordPress options
widget_shisp_img_slider_widget

Browser metrics Passed 4 tests

An overview of browser requirements for all-image-sliders-in-one
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,852 ▲25616.45 ▲0.9018.41 ▲4.9752.59 ▼2.04
Dashboard /wp-admin3,014 ▲806.09 ▲0.10148.24 ▼13.27144.84 ▲37.68
Posts /wp-admin/edit.php2,809 ▲702.77 ▲0.0670.73 ▼1.4097.60 ▲6.88
Add New Post /wp-admin/post-new.php1,720 ▲3718.68 ▲0.25404.31 ▲22.74116.24 ▼3.38
Media Library /wp-admin/upload.php1,815 ▲85.07 ▲0.04138.48 ▼19.88151.28 ▲21.61
Add New /wp-admin/post-new.php?post_type=shisp-image-slider2,9953.8999.41139.94
All Sliders /wp-admin/edit.php?post_type=shisp-image-slider1,4902.6867.5876.84
Subjects /wp-admin/edit-tags.php?taxonomy=shisp-sliders-subject&post_type=shisp-image-slider1,7782.6463.9680.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_shisp_img_slider_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/all-image-sliders-in-one/admin/js/shisp-slider-billboard.php
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined index: slideruid in wp-content/plugins/all-image-sliders-in-one/admin/js/shisp-slider-billboard.php on line 39
    • > PHP Notice
      Undefined index: navtype in wp-content/plugins/all-image-sliders-in-one/admin/js/shisp-slider-billboard.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/all-image-sliders-in-one/admin/includes/shisp-register-post-type.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/all-image-sliders-in-one/admin/view/shisp-sliders-metabox.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/all-image-sliders-in-one/admin/view/shisp-slider-setting.php:11
    • > PHP Notice
      Undefined index: ease in wp-content/plugins/all-image-sliders-in-one/admin/js/shisp-slider-billboard.php on line 40
    • > PHP Notice
      Undefined index: autoplay in wp-content/plugins/all-image-sliders-in-one/admin/js/shisp-slider-billboard.php on line 43
    • > PHP Notice
      Undefined index: includefooter in wp-content/plugins/all-image-sliders-in-one/admin/js/shisp-slider-billboard.php on line 46
    • > PHP Notice
      Undefined index: transition in wp-content/plugins/all-image-sliders-in-one/admin/js/shisp-slider-billboard.php on line 44
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/all-image-sliders-in-one/admin/view/shisp-image-slider-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
10 plugin tags: img slider, slider without shortcode, store page slider, woo slider, slider shortcode...

all-image-sliders-in-one/all-image-sliders-in-one.php 92% from 13 tests

The main PHP script in "all-image-sliders-in-one" version 2.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,051 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52061581,093
PHP713728589
CSS4392187
PO File17681182

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1365.00%
▷ Anonymous functions735.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
34 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/easeInOutQuart.png1.29KB0.71KB▼ 44.57%
admin/images/easeInQuad.png1.32KB0.71KB▼ 46.72%
admin/images/easeOutExpo.png1.31KB0.69KB▼ 47.31%
admin/images/swing.png1.28KB0.71KB▼ 44.94%
admin/images/easeOutCubic.png1.30KB0.70KB▼ 45.91%