10% before-after-image-comparison-slider

Code Review | Before After Image Comparison Slider

WordPress plugin Before After Image Comparison Slider scored10%from 54 tests.

About plugin

  • Plugin page: before-after-imag...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: Jul 3, 2022
  • Number of updates: 5
  • Update frequency: every 21.4 days
  • Top authors: stalukder03 (60%)wpxon (60%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/before-after-image-comparison-slider/includes/Metabox.php+26
    Undefined index: id

Server metrics [RAM: ▼1.73MB] [CPU: ▼58.87ms] Passed 4 tests

This is a short check of server-side resources used by Before After Image Comparison Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.217.14 ▼36.34
Dashboard /wp-admin2.28 ▼1.037.99 ▼50.81
Posts /wp-admin/edit.php2.28 ▼1.089.45 ▼44.87
Add New Post /wp-admin/post-new.php2.28 ▼3.618.26 ▼103.45
Media Library /wp-admin/upload.php2.28 ▼0.959.18 ▼30.68
All Sliders /wp-admin/edit.php?post_type=baics2.288.36
Add New /wp-admin/post-new.php?post_type=baics2.287.28

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Before After Image Comparison Slider: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲22014.87 ▲0.522.11 ▲0.4241.77 ▼3.81
Dashboard /wp-admin2,380 ▲2036.37 ▲0.72110.60 ▲19.4341.59 ▼2.43
Posts /wp-admin/edit.php2,308 ▲2053.65 ▲1.7048.46 ▲7.8731.35 ▼3.62
Add New Post /wp-admin/post-new.php1,565 ▲3623.69 ▲0.67662.46 ▼9.7436.82 ▼21.14
Media Library /wp-admin/upload.php1,451 ▲514.33 ▲0.1584.02 ▼34.5943.55 ▼5.03
All Sliders /wp-admin/edit.php?post_type=baics1,2883.5145.6427.52
Add New /wp-admin/post-new.php?post_type=baics2,1584.4686.5838.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/before-after-image-comparison-slider/includes/Metabox.php+26
    Undefined index: id
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=baics
    • > Notice in wp-content/plugins/before-after-image-comparison-slider/includes/Metabox.php+26
    Undefined index: id
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=baics
    • > Notice in wp-content/plugins/before-after-image-comparison-slider/includes/Metabox.php+34
    Undefined index: fields

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/before-after-image-comparison-slider/includes/functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/before-after-image-comparison-slider/includes/functions.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

before-after-image-comparison-slider/before-after-image-comparison-slider.php 92% from 13 tests

The main file in "Before After Image Comparison Slider" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • 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 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,761 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP172044151,278
CSS281261
JavaScript23230195
JSON20027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity27.00
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods65
▷ Static methods1827.69%
▷ Public methods6396.92%
▷ Protected methods00.00%
▷ Private methods23.08%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin