72% insta-type-gallery

Code Review | Stylish Profile Gallery - Wordpress Gallery, Custom Profile

WordPress plugin Stylish Profile Gallery - Wordpress Gallery, Custom Profile scored72%from 54 tests.

About plugin

  • Plugin page: insta-type-gallery
  • Plugin version: 1.1.22
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2016
  • Latest release: Oct 20, 2023
  • Number of updates: 120
  • Update frequency: every 20.7 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /26,438 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.62ms] Passed 4 tests

A check of server-side resources used by Stylish Profile Gallery - Wordpress Gallery, Custom Profile
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.02 ▼1.66
Dashboard /wp-admin3.46 ▲0.1546.45 ▼7.05
Posts /wp-admin/edit.php3.51 ▲0.1545.29 ▼3.04
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.41 ▼14.73
Media Library /wp-admin/upload.php3.32 ▲0.0939.51 ▲3.00
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.3931.89
Add Insta Gallery /wp-admin/post-new.php?post_type=insta_type_gallery3.7151.54
All Insta Gallery /wp-admin/edit.php?post_type=insta_type_gallery3.3236.03
Docs /wp-admin/edit.php?post_type=insta_type_gallery&page=sr-doc-page3.3134.47
Our Theme /wp-admin/edit.php?post_type=insta_type_gallery&page=sr-theme-page3.3234.38

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stylish Profile Gallery - Wordpress Gallery, Custom Profile
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.44 ▼0.948.58 ▲6.6844.19 ▼1.80
Dashboard /wp-admin2,268 ▲915.57 ▼0.0386.72 ▼13.2843.50 ▲0.60
Posts /wp-admin/edit.php2,182 ▲792.06 ▲0.0736.40 ▲0.8039.62 ▲3.56
Add New Post /wp-admin/post-new.php1,589 ▲6123.57 ▲0.33611.06 ▼52.8957.45 ▲6.03
Media Library /wp-admin/upload.php1,481 ▲844.22 ▲0.0499.88 ▲0.2045.36 ▲1.40
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0832.0623.2430.55
Add Insta Gallery /wp-admin/post-new.php?post_type=insta_type_gallery2,8564.1179.10409.68
All Insta Gallery /wp-admin/edit.php?post_type=insta_type_gallery1,1631.9933.4634.14
Docs /wp-admin/edit.php?post_type=insta_type_gallery&page=sr-doc-page9262.0525.7639.80
Our Theme /wp-admin/edit.php?post_type=insta_type_gallery&page=sr-theme-page1,0062.3326.5557.88

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=insta_type_gallery
    • > Notice in wp-content/plugins/insta-type-gallery/insta-type-gallery.php+117
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=insta_type_gallery
    • > Notice in wp-content/plugins/insta-type-gallery/insta-type-gallery.php+117
    Trying to access array offset on value of type null

SRP 50% 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 items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: insta_gallery_id in wp-content/plugins/insta-type-gallery/include/itg-no-lightbox.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/insta-type-gallery/include/itg-bootstrap-lightbox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/insta-type-gallery/class-tgm-plugin-activation.php:2129
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/insta-type-gallery/include/itg-no-lightbox.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/insta-type-gallery/our-theme/awp-theme.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=insta_type_gallery&page=sr-theme-page
    • > Network (severe)
    wp-content/plugins/insta-type-gallery/js/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add a description for screenshot #10 in insta-type-gallery/assets to your readme.txt
  • Screenshots: Please add images for these screenshots: #6 (insta style gallery screenshot-6 with 6column), #7 (insta style gallery screenshot-7 with 12 column)
You can look at the official readme.txt

insta-type-gallery/insta-type-gallery.php Passed 13 tests

This is the main PHP file of "Stylish Profile Gallery - Wordpress Gallery, Custom Profile" version 1.1.22, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
61 characters long description:
Insta type gallery plugin with lightbox preview for WordPress

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
No dangerous file extensions were detected35,537 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
CSS153,1936,91927,123
PHP86631,7563,658
JavaScript81901452,905
SVG3001,628
PO File1103104223

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity42.88
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods119
▷ Static methods54.20%
▷ Public methods9478.99%
▷ Protected methods2521.01%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.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
4 PNG files occupy 0.39MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/img/instagram-type-gallery-premium.png3.28KB3.27KB0.36%
assets/css/new-slide.png2.54KB1.19KB▼ 53.21%
include/img/bale-offer.png224.52KB92.51KB▼ 58.80%
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%