67% overlay-image-divi-module

Code Review | Overlay Image Divi Module

WordPress plugin Overlay Image Divi Module scored 67% from 54 tests.

About plugin

  • Plugin page: overlay-image-div...
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 29, 2020
  • Latest release: Aug 28, 2023
  • Number of updates: 31
  • Update frequency: every 39.3 days
  • Top authors: themeythemes (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active / 12,361 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.98MB] [CPU: ▲23.29ms] Passed 4 tests

An overview of server-side resources used by Overlay Image Divi Module
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4261.76 ▲18.67
Dashboard /wp-admin8.90 ▲5.5968.58 ▲21.35
Posts /wp-admin/edit.php8.90 ▲5.5470.11 ▲24.33
Add New Post /wp-admin/post-new.php9.24 ▲3.36124.31 ▲28.79
Media Library /wp-admin/upload.php8.90 ▲5.6774.70 ▲40.82
Upgrade  ➤ /wp-admin/admin.php?page=lwp_overlay_image-pricing8.9060.52
Contact Us /wp-admin/admin.php?page=lwp_overlay_image-contact8.9054.54
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9056.61
Support Forum /wp-admin/admin.php?page=lwp_overlay_image-wp-support-forum8.9050.43

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 198 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
fs_accounts
db_upgraded
fs_debug_mode
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Overlay Image Divi Module: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲7013.27 ▼1.331.95 ▲0.1445.51 ▼1.65
Dashboard /wp-admin2,214 ▲294.88 ▼0.02100.32 ▼2.4836.70 ▼9.45
Posts /wp-admin/edit.php2,094 ▲51.99 ▲0.0134.38 ▼2.6535.13 ▼1.01
Add New Post /wp-admin/post-new.php1,531 ▼518.31 ▼4.73654.93 ▼23.9250.92 ▼1.79
Media Library /wp-admin/upload.php1,396 ▲114.26 ▲0.0794.75 ▼17.4943.89 ▼5.14
Upgrade  ➤ /wp-admin/admin.php?page=lwp_overlay_image-pricing2,1963.3167.61150.06
Contact Us /wp-admin/admin.php?page=lwp_overlay_image-contact1,5373.1754.3853.51
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0601.9025.9225.04
Support Forum /wp-admin/admin.php?page=lwp_overlay_image-wp-support-forum2,0233.7990.7994.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/overlay-image-divi-module/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • fs_debug_mode
    • fs_active_plugins
    • fs_accounts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lwp_overlay_image-contact
    • > Notice in wp-content/plugins/overlay-image-divi-module/freemius/includes/managers/class-fs-admin-menu-manager.php+710
    Trying to access array offset on value of type bool
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lwp_overlay_image-contact
    • > Notice in wp-content/plugins/overlay-image-divi-module/freemius/includes/managers/class-fs-admin-menu-manager.php+710
    Trying to access array offset on value of type null

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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/overlay-image-divi-module/includes/modules/OverlayImages/OverlayImages.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/overlay-image-divi-module/includes/LwpFunctions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/overlay-image-divi-module/includes/functions-admin.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/overlay-image-divi-module/includes/LwpOverlayImages.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: Please take inspiration from this readme.txt

overlay-image-divi-module/lwp-overlay-images.php 77% from 13 tests

This is the main PHP file of "Overlay Image Divi Module" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 187 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("overlay-image-divi-module.php" instead of "lwp-overlay-images.php")

Code Analysis 97% from 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 plugin34,997 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP1268,08617,43034,139
Markdown12120453
JavaScript53459196
PO File17283194
CSS150015

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity86.35
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,269
▷ Static methods19915.68%
▷ Public methods88069.35%
▷ Protected methods171.34%
▷ Private methods37229.31%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/overlay-image-divi-module.png4.17KB3.86KB▼ 7.52%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%