84% before-after-images-for-divi

Code Review | Before + After Images for Divi

WordPress plugin Before + After Images for Divi scored84%from 54 tests.

About plugin

  • Plugin page: before-after-imag...
  • Plugin version: 1.3.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2018
  • Latest release: Apr 2, 2023
  • Number of updates: 52
  • Update frequency: every 33.1 days
  • Top authors: BoltonStudios (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active /27,527 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.34ms] Passed 4 tests

This is a short check of server-side resources used by Before + After Images for Divi
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.20 ▼4.07
Dashboard /wp-admin3.31 ▲0.0048.57 ▼3.51
Posts /wp-admin/edit.php3.36 ▲0.0055.13 ▲0.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.01 ▼6.43
Media Library /wp-admin/upload.php3.23 ▲0.0038.11 ▲3.74

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Before + After Images for Divi
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.352.00 ▲0.3243.07 ▲1.12
Dashboard /wp-admin2,195 ▲185.61 ▼0.0290.53 ▼3.2440.18 ▼3.32
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0239.22 ▼1.1936.56 ▼0.78
Add New Post /wp-admin/post-new.php1,526 ▼023.58 ▲0.52621.45 ▼92.2157.94 ▼0.02
Media Library /wp-admin/upload.php1,400 ▼34.25 ▼0.03105.44 ▼2.9745.49 ▲1.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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/before-after-images-for-divi/before-after-image-extension.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/before-after-images-for-divi/includes/modules/BeforeAfterImages/BeforeAfterImages.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/before-after-images-for-divi/includes/class-before-after-images-for-divi.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: slider, comparison, before, divi, after

before-after-images-for-divi/before-after-image-extension.php 92% from 13 tests

The entry point to "Before + After Images for Divi" version 1.3.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("before-after-images-for-divi.php" instead of "before-after-image-extension.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,177 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP496214611
Markdown12120453
PO File13950109
CSS2002
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity40.50
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity8.90
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods440.00%
▷ Protected methods00.00%
▷ Private methods660.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
No PNG files were detected