94% before-after-image-slider

Code Review | Before After Image Slider WP

WordPress plugin Before After Image Slider WP scored 94% from 54 tests.

About plugin

  • Plugin page: before-after-imag...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 5.8.1
  • First release: Mar 13, 2016
  • Latest release: Jun 6, 2017
  • Number of updates: 8
  • Update frequency: every 56.5 days
  • Top authors: swadeshswain (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 13,248 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.13ms] Passed 4 tests

This is a short check of server-side resources used by Before After Image Slider WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.16 ▲11.31
Dashboard /wp-admin3.07 ▲0.0244.45 ▲1.76
Posts /wp-admin/edit.php3.12 ▲0.0243.64 ▼2.01
Add New Post /wp-admin/post-new.php5.43 ▼0.0093.64 ▼568.30
Media Library /wp-admin/upload.php3.01 ▲0.0137.70 ▲4.04

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Before After Image Slider WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲15716.75 ▲1.1812.10 ▲2.2249.83 ▲3.27
Dashboard /wp-admin2,970 ▲395.88 ▼0.28146.34 ▼8.15114.97 ▲6.60
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0165.15 ▼4.7391.22 ▲3.76
Add New Post /wp-admin/post-new.php1,676 ▼1,90118.80 ▲3.89392.94 ▼89.29104.82 ▼3.66
Media Library /wp-admin/upload.php1,807 ▼05.06 ▲0.02154.81 ▼12.55116.61 ▼3.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/before-after-image-slider/before-after-image-slider.php:17

User-side errors Passed 1 test

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


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt might help

before-after-image-slider/before-after-image-slider.php Passed 13 tests

The main PHP script in "Before After Image Slider WP" version 2.2 is automatically included on every request by WordPress
114 characters long description:
This Responsive WordPress slider plugin will allow you to drag two images left and right that is before and after.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin76 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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.37MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screen1.png378.45KB111.99KB▼ 70.41%