72% ot-before-after-images-slide

Code Review | Before After Images Slide

WordPress plugin Before After Images Slide scored72%from 54 tests.

About plugin

  • Plugin page: ot-before-after-i...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Aug 31, 2017
  • Latest release: Apr 19, 2018
  • Number of updates: 10
  • Update frequency: every 23.2 days
  • Top authors: caselock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 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.01MB] [CPU: ▼4.14ms] Passed 4 tests

This is a short check of server-side resources used by Before After Images Slide
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0727.18 ▼9.96
Dashboard /wp-admin3.32 ▲0.0144.74 ▼9.46
Posts /wp-admin/edit.php3.37 ▲0.0146.73 ▲0.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.45 ▲2.59
Media Library /wp-admin/upload.php3.24 ▲0.0139.60 ▲3.49
OT Before After Images Slide /wp-admin/options-general.php?page=otbfimg3.2529.59

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Before After Images Slide
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲15613.61 ▼1.047.37 ▲5.8343.63 ▲4.68
Dashboard /wp-admin2,210 ▲195.03 ▲0.11108.17 ▲2.0041.85 ▼0.69
Posts /wp-admin/edit.php2,093 ▲42.14 ▲0.1338.70 ▲2.7435.51 ▲2.98
Add New Post /wp-admin/post-new.php1,545 ▲1118.28 ▼5.15587.09 ▼94.6949.21 ▼2.69
Media Library /wp-admin/upload.php1,389 ▼24.30 ▲0.1193.82 ▼7.2642.93 ▼4.69
OT Before After Images Slide /wp-admin/options-general.php?page=otbfimg1,3482.0627.40140.80

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=otbfimg
    • > Notice in wp-content/plugins/ot-before-after-images-slide/functions.php+23
    Undefined index: otbfimg_otcolumnwidth
    • > GET request to /wp-admin/options-general.php?page=otbfimg
    • > Notice in wp-content/plugins/ot-before-after-images-slide/functions.php+34
    Undefined index: otbfimg_otdisplay
    • > GET request to /wp-admin/options-general.php?page=otbfimg
    • > Notice in wp-content/plugins/ot-before-after-images-slide/functions.php+45
    Undefined index: otbfimg_otbeforeafter
    • > GET request to /wp-admin/options-general.php?page=otbfimg
    • > Notice in wp-content/plugins/ot-before-after-images-slide/functions.php+56
    Undefined index: otbfimg_otmove

SRP 50% 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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ot-before-after-images-slide/functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ot-before-after-images-slide/otbfimg-shortcode.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ot-before-after-images-slide/otbfimg-setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ot-before-after-images-slide/otbfimg.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=otbfimg
    • > Javascript (severe) in unknown
    /wp-content/plugins/ot-before-after-images-slide/assets/js/bootstrap.min.js?ver=6.3.1 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: before and after image, images slide

ot-before-after-images-slide/otbfimg.php 85% from 13 tests

Analyzing the main PHP file in "Before After Images Slide" version 1.2.2
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 200 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ot-before-after-images-slide.php" instead of "otbfimg.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,036 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS523340988
JavaScript5158103561
SVG100288
PHP43017199

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/powered_icon.png1.43KB0.45KB▼ 68.87%