77% egw-widgets-hover-effects

Code Review | Image Hover Effects Widgets

WordPress plugin Image Hover Effects Widgets scored77%from 54 tests.

About plugin

  • Plugin page: egw-widgets-hover...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.5
  • WordPress version: 6.3.1
  • First release: Sep 10, 2014
  • Latest release: Dec 7, 2016
  • Number of updates: 35
  • Update frequency: every 28.0 days
  • Top authors: proscriptsell (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /14,290 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.06ms] Passed 4 tests

A check of server-side resources used by Image Hover Effects Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.94 ▼7.10
Dashboard /wp-admin3.39 ▲0.0948.73 ▼0.80
Posts /wp-admin/edit.php3.50 ▲0.1551.57 ▲5.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.04 ▲2.66
Media Library /wp-admin/upload.php3.29 ▲0.0636.58 ▼11.00

Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/egw-widgets-hover-effects/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/egw-widgets-hover-effects/assets/banner-772\303\227250.png"
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_egw
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Image Hover Effects Widgets: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21514.81 ▲0.441.87 ▼0.4644.77 ▼1.84
Dashboard /wp-admin2,354 ▲1636.50 ▲1.65125.85 ▲8.6739.51 ▼3.85
Posts /wp-admin/edit.php2,260 ▲1713.40 ▲1.3854.44 ▲18.9135.67 ▲3.22
Add New Post /wp-admin/post-new.php1,525 ▼817.64 ▼5.56627.49 ▼62.0831.52 ▼26.83
Media Library /wp-admin/upload.php1,399 ▲114.27 ▼0.0390.68 ▼14.3145.04 ▲2.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_egw
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/egw-widgets-hover-effects/includes/egw-template.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/egw-widgets-hover-effects/includes/egw-template.php on line 29
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/egw-widgets-hover-effects/includes/egw-template.php on line 83
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/egw-widgets-hover-effects/includes/egw-template.php on line 29
    • > PHP Notice
      Undefined variable: div_id in wp-content/plugins/egw-widgets-hover-effects/includes/back-end.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/egw-widgets-hover-effects/egwHoverEffects.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/egw-widgets-hover-effects/includes/back-end.php:7
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/egw-widgets-hover-effects/includes/egw-template.php on line 83

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Screenshot #1 (Widgets admin screen) image required
  • Tags: Please reduce the number of tags, currently 43 tag instead of maximum 10
The official readme.txt might help

egw-widgets-hover-effects/egwHoverEffects.php 92% from 13 tests

The primary PHP file in "Image Hover Effects Widgets" version 2.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("egw-widgets-hover-effects.php" instead of "egwHoverEffects.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
Good job! No executable or dangerous file extensions detected2,077 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS31763863
JavaScript24366604
PHP349102525
PO File163474
SVG10011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.00
▷ Minimum class complexity4.00
▷ Maximum class complexity6.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1164.71%
▷ Protected methods635.29%
▷ 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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772×250.png138.54KB48.61KB▼ 64.92%
screenshot-1.png27.28KB12.30KB▼ 54.89%