90% wp-before-after-image-slider

Code Review | WP Before After Image Slider – Advanced Image comparison Plugin for WordPress

WordPress plugin WP Before After Image Slider – Advanced Image comparison Plugin for WordPress scored90%from 54 tests.

About plugin

  • Plugin page: wp-before-after-i...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 21, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: codecanel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /34 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼7.45ms] Passed 4 tests

Analyzing server-side resources used by WP Before After Image Slider – Advanced Image comparison Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2438.72 ▼2.49
Dashboard /wp-admin3.53 ▲0.1847.65 ▼15.47
Posts /wp-admin/edit.php3.64 ▲0.2850.53 ▼0.51
Add New Post /wp-admin/post-new.php6.12 ▲0.2386.55 ▼11.33
Media Library /wp-admin/upload.php3.45 ▲0.2240.44 ▲6.70
Add New /wp-admin/post-new.php?post_type=coca_bais3.5351.85
All Sliders /wp-admin/edit.php?post_type=coca_bais3.5038.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 46 new files
Database: no new tables, 8 new options
New WordPress options
coca_bais_version
db_upgraded
can_compress_scripts
coca_bais_installed
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Before After Image Slider – Advanced Image comparison Plugin for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲7914.34 ▲0.101.73 ▲0.0338.40 ▼6.69
Dashboard /wp-admin2,226 ▲525.59 ▼0.0791.32 ▼7.9041.03 ▼7.56
Posts /wp-admin/edit.php2,135 ▲352.03 ▼0.0038.29 ▲0.6937.50 ▲2.43
Add New Post /wp-admin/post-new.php1,562 ▲3625.15 ▲2.12653.20 ▲41.1470.85 ▲16.17
Media Library /wp-admin/upload.php1,435 ▲444.21 ▼0.0495.33 ▼6.5041.51 ▼0.02
Add New /wp-admin/post-new.php?post_type=coca_bais1,8238.58224.5843.66
All Sliders /wp-admin/edit.php?post_type=coca_bais1,1201.9030.7029.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • coca_bais_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • coca_bais_installed
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
5 plugin tags: comparison, image, after, before, slider

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

The principal PHP file in "WP Before After Image Slider – Advanced Image comparison Plugin for WordPress" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,175 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP152015441,159
JavaScript100010
CSS6006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.29
▷ Minimum class complexity5.00
▷ Maximum class complexity21.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods48
▷ Static methods918.75%
▷ Public methods4287.50%
▷ Protected methods24.17%
▷ Private methods48.33%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/lib/images/3.png3.08KB3.07KB0.22%
assets/lib/images/Vertical.png0.17KB0.17KB0.00%
assets/lib/images/2.png3.04KB3.27KB0.00%
assets/lib/images/logo.png2.05KB2.04KB0.14%
assets/lib/images/6.png4.67KB4.63KB▼ 0.82%