67% image-grid-with-hover-effects

Code Review | Image grid with hover effects

WordPress plugin Image grid with hover effects scored67%from 54 tests.

About plugin

  • Plugin page: image-grid-with-h...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.2
  • WordPress version: 6.3.1
  • First release: May 14, 2018
  • Latest release: Sep 2, 2019
  • Number of updates: 16
  • Update frequency: every 29.9 days
  • Top authors: webgensis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /859 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼3.18ms] Passed 4 tests

Server-side resources used by Image grid with hover effects
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2946.16 ▲10.69
Dashboard /wp-admin3.83 ▲0.4850.60 ▼10.10
Posts /wp-admin/edit.php3.85 ▲0.4956.28 ▲8.90
Add New Post /wp-admin/post-new.php6.42 ▲0.5485.51 ▼18.65
Media Library /wp-admin/upload.php3.72 ▲0.5040.61 ▲7.13
Image Grid /wp-admin/post-new.php?post_type=imagegrid4.0246.83
All Image Grid /wp-admin/edit.php?post_type=imagegrid3.8041.30

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

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

Browser metrics Passed 4 tests

Image grid with hover effects: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲19013.86 ▼0.489.62 ▲7.7843.69 ▲2.17
Dashboard /wp-admin2,237 ▲605.59 ▼0.0797.03 ▲11.9036.71 ▼4.37
Posts /wp-admin/edit.php2,145 ▲452.06 ▲0.1144.10 ▲9.3935.36 ▲0.94
Add New Post /wp-admin/post-new.php1,560 ▲3223.48 ▲0.53712.86 ▲132.6156.63 ▲10.16
Media Library /wp-admin/upload.php1,442 ▲394.28 ▲0.03103.31 ▲6.6144.78 ▲0.73
Image Grid /wp-admin/post-new.php?post_type=imagegrid1,2961.517.2031.50
All Image Grid /wp-admin/edit.php?post_type=imagegrid1,1141.9733.3230.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=imagegrid
    • > Compile error in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Checkbox.php+35
    Declaration of CMB2_Type_Checkbox::render() must be compatible with CMB2_Type_Text::render($args = Array)

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/image-grid-with-hover-effects/inc/css/index.php
    • > /wp-content/plugins/image-grid-with-hover-effects/inc/img/index.php
    • > /wp-content/plugins/image-grid-with-hover-effects/inc/index.php
    • > /wp-content/plugins/image-grid-with-hover-effects/index.php
    • > /wp-content/plugins/image-grid-with-hover-effects/inc/js/index.php
  • 35× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-grid-with-hover-effects/inc/cmb2/init.php:120

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=imagegrid
    • > Network (severe)
    wp-content/plugins/image-grid-with-hover-effects/inc/admin/css/wg-ighe-admin.css?ver=1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=imagegrid
    • > Network (severe)
    wp-content/plugins/image-grid-with-hover-effects/inc/admin/js/wg-ighe-admin.js?ver=1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: "www.webgensis.com"
You can take inspiration from this readme.txt

image-grid-with-hover-effects/image-grid-with-hover-effects.php Passed 13 tests

The principal PHP file in "Image grid with hover effects" v. 1.0 is loaded by WordPress automatically on each request
129 characters long description:
Create attractive image grids with hover with title, description and link on hover. Place it anywhere with easy to use shortcode.

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 plugin43,425 lines of code in 193 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78217,88231,544
PHP521,7284,6786,034
CSS131,0021,0344,456
JavaScript6291275963
Markdown21440428

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity16.43
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes63
▷ Abstract classes812.70%
▷ Concrete classes5587.30%
▷ Final classes00.00%
Methods430
▷ Static methods6715.58%
▷ Public methods35983.49%
▷ Protected methods6815.81%
▷ Private methods30.70%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants960.00%
▷ Class constants640.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
inc/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
inc/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%