74% wp-before-after-slider

Code Review | WP Before After Slider

WordPress plugin WP Before After Slider scored74%from 54 tests.

About plugin

  • Plugin page: wp-before-after-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2019
  • Latest release: Nov 16, 2019
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: pitabas106 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /907 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼59.42ms] Passed 4 tests

A check of server-side resources used by WP Before After Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.185.02 ▼40.17
Dashboard /wp-admin2.30 ▼1.047.32 ▼60.95
Posts /wp-admin/edit.php2.30 ▼1.056.50 ▼42.68
Add New Post /wp-admin/post-new.php2.30 ▼3.587.36 ▼93.86
Media Library /wp-admin/upload.php2.30 ▼0.936.74 ▼32.11
All Sliders /wp-admin/admin.php?page=wpbaslider2.306.39
/wp-admin/admin.php?page=add-wpbaslider2.307.58
/wp-admin/admin.php?page=wpbaslider-settings2.305.61

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Before After Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲3014.15 ▼0.591.77 ▼0.2938.58 ▼5.30
Dashboard /wp-admin2,225 ▲515.64 ▲0.1184.91 ▼14.5739.10 ▼5.57
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0739.39 ▼0.3836.04 ▼2.38
Add New Post /wp-admin/post-new.php1,548 ▲2022.98 ▲0.16643.13 ▲20.5976.06 ▲25.41
Media Library /wp-admin/upload.php1,427 ▲274.19 ▼0.0399.32 ▼11.9045.49 ▼2.26
All Sliders /wp-admin/admin.php?page=wpbaslider1,1473.0444.4739.21
/wp-admin/admin.php?page=add-wpbaslider1,1153.0541.3729.85
/wp-admin/admin.php?page=wpbaslider-settings1,3703.0650.7239.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-before-after-slider/inc/class-wp-before-after-slider.php+855
    Use of undefined constant HFWE_DIR - assumed 'HFWE_DIR' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbaslider-settings
    • > Warning in wp-content/plugins/wp-before-after-slider/inc/class-wp-before-after-slider.php+855
    Use of undefined constant HFWE_DIR - assumed 'HFWE_DIR' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbaslider-settings
    • > Notice in wp-content/plugins/wp-before-after-slider/inc/admin/templates/slider-settings.php+13
    Undefined index: slider

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: before-after-slider, image-slider, before after image slider

wp-before-after-slider/wp-after-before-slider.php 85% from 13 tests

Analyzing the main PHP file in "WP Before After Slider" version 1.0.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-before-after-slider.php" instead of "wp-after-before-slider.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin3,890 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63196461,809
PHP93672811,103
CSS66117675
SVG211303

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.27
Average class complexity84.00
▷ Minimum class complexity84.00
▷ Maximum class complexity84.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/images/close-icon.png2.34KB2.42KB0.00%
assets/libs/bxslider/css/images/controls.png2.74KB1.42KB▼ 48.29%
inc/admin/assets/images/pencil-icon.png2.15KB2.15KB0.05%
inc/admin/assets/images/gear-icon.png1.95KB1.82KB▼ 6.76%
assets/images/wp-bas-logo.png13.71KB6.46KB▼ 52.90%