84% simple-gallery-with-filter

Code Review | Simple Gallery with Filter

WordPress plugin Simple Gallery with Filter scored84%from 54 tests.

About plugin

  • Plugin page: simple-gallery-wi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Apr 30, 2020
  • Latest release: Oct 12, 2022
  • Number of updates: 6
  • Update frequency: every 149.3 days
  • Top authors: jitendra742744 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.81ms] Passed 4 tests

Server-side resources used by Simple Gallery with Filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.19 ▲0.80
Dashboard /wp-admin3.34 ▲0.0450.93 ▲0.71
Posts /wp-admin/edit.php3.39 ▲0.0449.43 ▲0.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.26 ▼2.41
Media Library /wp-admin/upload.php3.27 ▲0.0433.81 ▼2.22
Gallery /wp-admin/edit.php?post_type=sgwf_gallery3.3136.51
Category /wp-admin/edit-tags.php?taxonomy=sgwf_cat&post_type=sgwf_gallery3.2636.68
Add New /wp-admin/post-new.php?post_type=sgwf_gallery3.3852.38

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_sfwf_gallerymain_widget
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Gallery with Filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.35 ▲0.002.45 ▲0.5741.79 ▼8.66
Dashboard /wp-admin2,244 ▲645.65 ▼0.0590.03 ▲6.1337.86 ▼6.27
Posts /wp-admin/edit.php2,149 ▲492.01 ▲0.0540.50 ▲1.6637.15 ▼3.62
Add New Post /wp-admin/post-new.php1,567 ▲4123.31 ▲0.07661.38 ▼67.2371.18 ▲11.98
Media Library /wp-admin/upload.php1,449 ▲494.20 ▲0.0198.25 ▼8.8542.85 ▼2.73
Gallery /wp-admin/edit.php?post_type=sgwf_gallery1,1131.9633.8533.53
Category /wp-admin/edit-tags.php?taxonomy=sgwf_cat&post_type=sgwf_gallery1,3202.1226.6429.76
Add New /wp-admin/post-new.php?post_type=sgwf_gallery2,3157.57167.1965.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_sfwf_gallerymain_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-gallery-with-filter/simple-gallery-with-filter.php:20

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: lightbox gallery, popup filter gallery, gallery, portfolio filter, wordpress responsive gallery...

simple-gallery-with-filter/simple-gallery-with-filter.php 85% from 13 tests

The entry point to "Simple Gallery with Filter" 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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 182 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin377 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP15716249
CSS3392112
JavaScript23015
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/nopic.png0.50KB0.48KB▼ 4.48%
assets/img/icons.png0.71KB0.43KB▼ 39.64%