62% ba-plus-before-after-image-slider-free

Code Review | BA Plus - Before & After Image Slider FREE

WordPress plugin BA Plus - Before & After Image Slider FREE scored62%from 54 tests.

About plugin

  • Plugin page: ba-plus-before-af...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.4
  • WordPress version: 6.3.1
  • First release: Sep 10, 2019
  • Latest release: May 8, 2020
  • Number of updates: 12
  • Update frequency: every 20.1 days
  • Top authors: cx4djv (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /9,605 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.67MB] [CPU: ▼25.82ms] Passed 4 tests

Analyzing server-side resources used by BA Plus - Before & After Image Slider FREE
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.43 ▼2.55
Dashboard /wp-admin3.34 ▼0.0147.62 ▼17.89
Posts /wp-admin/edit.php3.39 ▲0.0350.70 ▲4.08
Add New Post /wp-admin/post-new.php3.17 ▼2.7235.25 ▼81.89
Media Library /wp-admin/upload.php3.26 ▲0.0334.82 ▼0.94
Before After Plus /wp-admin/admin.php?page=s201-bai-slider3.2333.30
Add BAI Slider /wp-admin/post-new.php?post_type=s201_bai_post3.1236.14

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_s201_bai
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BA Plus - Before & After Image Slider FREE
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14213.46 ▼0.907.56 ▲6.0343.01 ▲3.75
Dashboard /wp-admin2,222 ▲425.62 ▼0.0093.02 ▲2.2937.52 ▼0.00
Posts /wp-admin/edit.php2,130 ▲302.04 ▲0.0544.48 ▲2.8337.31 ▼0.26
Add New Post /wp-admin/post-new.php6,887 ▲5,36126.05 ▲2.40961.40 ▲345.7842.39 ▼10.18
Media Library /wp-admin/upload.php1,424 ▲334.21 ▲0.01100.64 ▼7.4444.29 ▼0.54
Before After Plus /wp-admin/admin.php?page=s201-bai-slider9282.0325.8926.84
Add BAI Slider /wp-admin/post-new.php?post_type=s201_bai_post2,2923.9273.4337.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_s201_bai
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=s201_bai_post
    • > Notice in wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php+112
    Undefined index: s201_nonce
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=s201_bai_post
    • > Notice in wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php+54
    Trying to access array offset on value of type bool

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ba-plus-before-after-image-slider-free/index.php:13
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php on line 40
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php on line 3
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php on line 86
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ba-plus-before-after-image-slider-free/S201_BAI_Table.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/ba-plus-before-after-image-slider-free/S201_BAI_Table.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/ba-plus-before-after-image-slider-free/S201_BAI_Table.php on line 3
    • > PHP Notice
      Undefined variable: slides in wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php on line 40
    • > PHP Notice
      Undefined variable: meta in wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php on line 3
    • > PHP Notice
      Undefined index: s201_styles in wp-content/plugins/ba-plus-before-after-image-slider-free/templates/default.php on line 3

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 96% 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
5 plugin tags: image comparison, before after slider, compare images, before after, before after viewer

ba-plus-before-after-image-slider-free/index.php 92% from 13 tests

"BA Plus - Before & After Image Slider FREE" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ba-plus-before-after-image-slider-free.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin885 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP95133646
CSS2280189
JavaScript20050

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1263.16%
▷ Anonymous functions736.84%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin