84% grid-view-gallery

Code Review | Grid View Gallery

WordPress plugin Grid View Gallery scored 84% from 54 tests.

About plugin

  • Plugin page: grid-view-gallery
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jan 8, 2016
  • Latest release: Mar 28, 2018
  • Number of updates: 8
  • Update frequency: every 101.4 days
  • Top authors: priyajain2802 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 6,391 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.56ms] Passed 4 tests

Server-side resources used by Grid View Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.35 ▼5.16
Dashboard /wp-admin3.41 ▲0.1047.67 ▼6.85
Posts /wp-admin/edit.php3.46 ▲0.1051.06 ▲4.85
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.82 ▼9.41
Media Library /wp-admin/upload.php3.33 ▲0.1035.26 ▼0.80
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=custom-slider3.3235.43
Settings /wp-admin/edit.php?post_type=custom-slider&page=slider-settings3.3532.39
Add New Gallery /wp-admin/post-new.php?post_type=custom-slider3.3749.09
All Gallery /wp-admin/edit.php?post_type=custom-slider3.3837.42
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=custom-slider3.3239.46

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
CS_Settings
category_children

Browser metrics Passed 4 tests

This is an overview of browser requirements for Grid View Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.30 ▼1.001.71 ▼0.1842.72 ▲2.27
Dashboard /wp-admin2,229 ▲445.86 ▲0.95111.44 ▲6.9840.86 ▲0.33
Posts /wp-admin/edit.php2,135 ▲462.26 ▲0.2540.21 ▲2.9536.20 ▲1.48
Add New Post /wp-admin/post-new.php1,543 ▲1022.97 ▼0.24630.00 ▼17.1234.96 ▼21.02
Media Library /wp-admin/upload.php1,430 ▲424.31 ▲0.06100.32 ▼3.6146.82 ▲3.37
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=custom-slider1,3502.3328.0230.43
Settings /wp-admin/edit.php?post_type=custom-slider&page=slider-settings1,2094.6245.4052.08
Add New Gallery /wp-admin/post-new.php?post_type=custom-slider1,7132.8156.8053.13
All Gallery /wp-admin/edit.php?post_type=custom-slider1,1422.1733.0528.01
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=custom-slider1,4862.3328.2933.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • category_children
    • widget_recent-comments
    • CS_Settings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/grid-view-gallery/custom-slider-short-code.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/grid-view-gallery/custom-slider.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/grid-view-gallery/custom-slider-settings.php:5

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

grid-view-gallery/custom-slider.php 92% from 13 tests

The entry point to "Grid View Gallery" version 1.0 is a PHP file that has certain tags in its header comment area
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 ("grid-view-gallery.php" instead of "custom-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin12,057 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
CSS116322358,731
Sass131922928
LESS121827907
PHP36268551
SVG100414
JavaScript42125373
PO File16661,355153

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/next.png1.32KB1.58KB0.00%
images/prev.png1.33KB1.59KB0.00%
images/closess.png3.08KB0.64KB▼ 79.28%
images/Close-icon.png18.37KB8.39KB▼ 54.31%
images/close.png4.13KB1.49KB▼ 63.97%