83% before-after-for-woocommerce

Code Review | Before After Slider for WooCommerce - eBEAF

WordPress plugin Before After Slider for WooCommerce - eBEAF scored83%from 54 tests.

About plugin

  • Plugin page: before-after-for-...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 2, 2021
  • Latest release: Nov 16, 2023
  • Number of updates: 54
  • Update frequency: every 14.2 days
  • Top authors: psdtowpservice (75.93%)themefic (25.93%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /4,083 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.42MB] [CPU: ▲2.81ms] Passed 4 tests

Analyzing server-side resources used by Before After Slider for WooCommerce - eBEAF
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4038.11 ▼2.74
Dashboard /wp-admin3.78 ▲0.4857.81 ▲14.75
Posts /wp-admin/edit.php3.83 ▲0.4858.55 ▲8.11
Add New Post /wp-admin/post-new.php6.30 ▲0.4189.96 ▼0.18
Media Library /wp-admin/upload.php3.62 ▲0.3939.13 ▲6.03
eBEAF /wp-admin/admin.php?page=beafwc-add-new-slider3.5935.44
Add New Slider /wp-admin/admin.php?page=add-new-slider3.5935.44

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 36 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
tf_display_admin_notice_time
widget_theysaidso_widget
theysaidso_admin_options
beafwc_installation_date
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Before After Slider for WooCommerce - eBEAF
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,139 ▲35215.61 ▲0.875.21 ▲3.2628.58 ▼17.18
Dashboard /wp-admin2,415 ▲2356.50 ▲0.85124.93 ▲27.1046.14 ▲3.97
Posts /wp-admin/edit.php2,354 ▲2513.66 ▲1.7262.18 ▲15.8639.56 ▲2.47
Add New Post /wp-admin/post-new.php1,592 ▲6623.42 ▲0.33590.43 ▼111.2435.87 ▼40.34
Media Library /wp-admin/upload.php1,491 ▲884.43 ▲0.1488.39 ▼24.1744.66 ▼2.75
eBEAF /wp-admin/admin.php?page=beafwc-add-new-slider7231.5010.5120.91
Add New Slider /wp-admin/admin.php?page=add-new-slider7231.6910.4520.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • tf_display_admin_notice_time
    • beafwc_installation_date
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add-new-slider
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

before-after-for-woocommerce/before-after-for-woocommerce.php 77% from 13 tests

The main PHP file in "Before After Slider for WooCommerce - eBEAF" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
There were no executable files found in this plugin4,873 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP105777702,605
CSS3244221,218
JavaScript5249130809
Markdown1700196
JSON10045

PHP code Passed 2 tests

An short overview of 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.35
Average class complexity43.60
▷ Minimum class complexity9.00
▷ Maximum class complexity86.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods95
▷ Static methods11.05%
▷ Public methods6164.21%
▷ Protected methods66.32%
▷ Private methods2829.47%
Functions25
▷ Named functions2392.00%
▷ Anonymous functions28.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 1.18MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/BLACK_FRIDAY_BACKGROUND_GRUNGE_notice-2022.png249.07KB267.93KB0.00%
assets/image/style3.png1.29KB0.65KB▼ 49.81%
assets/image/style2.png0.86KB0.45KB▼ 47.90%
assets/image/style6.png0.97KB0.52KB▼ 46.83%
assets/image/style5.png1.34KB0.76KB▼ 43.04%