84% image-hover-effects-for-visual-composer

Code Review | Image Hover Effects For WPBakery Page Builder

WordPress plugin Image Hover Effects For WPBakery Page Builder scored84%from 54 tests.

About plugin

  • Plugin page: image-hover-effec...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 12, 2017
  • Latest release: Sep 27, 2022
  • Number of updates: 42
  • Update frequency: every 49.5 days
  • Top authors: nasir179125 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

4,000+ active /42,294 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.06ms] Passed 4 tests

This is a short check of server-side resources used by Image Hover Effects For WPBakery Page Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.60 ▼2.63
Dashboard /wp-admin3.32 ▼0.0246.63 ▼20.19
Posts /wp-admin/edit.php3.37 ▲0.0250.29 ▼1.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.56 ▼15.69
Media Library /wp-admin/upload.php3.24 ▲0.0241.23 ▲3.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Image Hover Effects For WPBakery Page Builder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.29 ▼0.212.26 ▲0.6642.72 ▼2.84
Dashboard /wp-admin2,209 ▲325.63 ▼0.0292.23 ▲4.3043.89 ▼5.14
Posts /wp-admin/edit.php2,118 ▲181.96 ▼0.0743.57 ▲4.8836.09 ▲0.46
Add New Post /wp-admin/post-new.php1,538 ▲1022.97 ▼0.06685.55 ▲11.1258.36 ▲5.96
Media Library /wp-admin/upload.php1,411 ▲84.19 ▲0.0296.15 ▼14.8842.37 ▼2.06

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 4× 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/image-hover-effects-for-visual-composer/main.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-hover-effects-for-visual-composer/main.php:7
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/image-hover-effects-for-visual-composer/render/hover.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/image-hover-effects-for-visual-composer/includes/hoverSetting.php:112

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
You can take inspiration from this readme.txt

image-hover-effects-for-visual-composer/index.php 92% from 13 tests

"Image Hover Effects For WPBakery Page Builder" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("image-hover-effects-for-visual-composer.php" instead of "index.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
Success! There were no dangerous files found in this plugin13,228 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS22,1095612,853
PHP43426367
JavaScript1008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
images/ihe.png4.90KB2.65KB▼ 45.80%