54% photo-gallery-plus

Code Review | Photo Gallery Plus - Image Gallery Plugin for WordPress

WordPress plugin Photo Gallery Plus - Image Gallery Plugin for WordPress scored 54% from 54 tests.

About plugin

  • Plugin page: photo-gallery-plus
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 5.8.1
  • First release: Jun 12, 2017
  • Latest release: Jun 17, 2017
  • Number of updates: 38
  • Update frequency: every 0.9 days
  • Top authors: thewpgeeks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 740 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.61MB] [CPU: ▼192.71ms] Passed 4 tests

Analyzing server-side resources used by Photo Gallery Plus - Image Gallery Plugin for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.02 ▼0.815.48 ▼30.77
Dashboard /wp-admin2.04 ▼1.026.14 ▼32.68
Posts /wp-admin/edit.php2.04 ▼1.075.38 ▼43.42
Add New Post /wp-admin/post-new.php2.04 ▼3.395.61 ▼657.58
Media Library /wp-admin/upload.php2.04 ▼0.975.65 ▼37.15
/wp-admin/admin.php?page=pgp_sort_albums2.046.49
/wp-admin/admin.php?page=pgp_blog_style_layout2.047.81
/wp-admin/admin.php?page=pgp_justified_grid_layout2.048.75
/wp-admin/admin.php?page=pgp_blog_style_layout_shortcode2.046.51
/wp-admin/admin.php?page=pgp_add_album2.047.80
/wp-admin/admin.php?page=pgp_add_tag2.046.76
System Information /wp-admin/admin.php?page=pgp_system_information2.046.14
/wp-admin/admin.php?page=pgp_order_by_settings2.046.52
/wp-admin/admin.php?page=pgp_masonry_layout2.047.15
/wp-admin/admin.php?page=pgp_image_browser_layout2.045.72

Server storage [IO: ▲5.08MB] [DB: ▲0.05MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • Illegal file modification found: 80 files (3,399.48KB) outside of "wp-content/plugins/photo-gallery-plus/" and "wp-content/uploads/"
    • (new file) wp-content/photo-gallery-plus/original-images/demo1-2.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/bg-app-3.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/after-2.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/bg-app-2.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/bg-app.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/bg-app-1.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/after-1.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/after-3.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/demo1-1.jpg
    • (new file) wp-content/photo-gallery-plus/original-images/after.jpg
    • ...
Filesystem: 187 new files
Database: 2 new tables, 2 new options
New tables
wp_photo_gallery_plus
wp_photo_gallery_plus_meta
New WordPress options
widget_photo_gallery_plus_widget
photo-gallery-plus-version-number

Browser metrics Passed 4 tests

Photo Gallery Plus - Image Gallery Plugin for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,843 ▲24716.16 ▲0.327.83 ▼0.7356.50 ▲4.11
Dashboard /wp-admin3,040 ▲1065.90 ▼0.09141.77 ▼4.08124.10 ▲8.89
Posts /wp-admin/edit.php2,834 ▲952.68 ▲0.0171.01 ▲2.2386.90 ▼15.55
Add New Post /wp-admin/post-new.php1,755 ▲16418.14 ▼0.63367.68 ▼10.01115.63 ▲1.46
Media Library /wp-admin/upload.php1,831 ▲245.02 ▲0.00138.03 ▼20.26155.60 ▲29.63
/wp-admin/admin.php?page=pgp_sort_albums1,7423.0687.69125.65
/wp-admin/admin.php?page=pgp_blog_style_layout1,7412.7067.71130.64
/wp-admin/admin.php?page=pgp_justified_grid_layout1,7412.7066.20113.98
/wp-admin/admin.php?page=pgp_blog_style_layout_shortcode1,7372.7066.43125.06
/wp-admin/admin.php?page=pgp_add_album1,7372.6970.66116.16
/wp-admin/admin.php?page=pgp_add_tag1,7372.6866.54113.36
System Information /wp-admin/admin.php?page=pgp_system_information1,7372.6869.16119.80
/wp-admin/admin.php?page=pgp_order_by_settings1,7412.7069.82122.45
/wp-admin/admin.php?page=pgp_masonry_layout1,7412.7067.88114.40
/wp-admin/admin.php?page=pgp_image_browser_layout1,7412.6965.76116.76

Uninstaller [IO: ▲3.32MB] [DB: ▲0.05MB] 25% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/photo-gallery-plus/photo-gallery-plus.php+818
    Function create_function() is deprecated
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_photo_gallery_plus
    • wp_photo_gallery_plus_meta
  • Zombie WordPress options were found after uninstall: 2 options
    • widget_photo_gallery_plus_widget
    • photo-gallery-plus-version-number

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pgp_image_browser_layout
    • > Deprecated in wp-content/plugins/photo-gallery-plus/photo-gallery-plus.php+818
    Function create_function() is deprecated

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

photo-gallery-plus/photo-gallery-plus.php Passed 13 tests

The entry point to "Photo Gallery Plus - Image Gallery Plugin for WordPress" version 1.0.3 is a PHP file that has certain tags in its header comment area
124 characters long description:
Photo Gallery Plus is an interactive WordPress photo gallery plugin, best fit for creative and corporate portfolio websites.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/photo-gallery-plus/assets/global/plugins/pluploader/moxie.xap
69,580 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
PHP656531,54434,361
JavaScript172,6562,13118,405
CSS211,24255615,356
SVG3001,458

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods521.74%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions76
▷ Named functions76100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants29100.00%
▷ Class constants00.00%
▷ Public constants00.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
54 PNG files occupy 0.18MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/global/img/portlet-collapse-icon.png0.26KB0.25KB▼ 5.20%
assets/admin/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
assets/global/img/portlet-config-icon.png0.32KB0.44KB0.00%
assets/admin/images/image-effect/negative.png1.88KB1.65KB▼ 12.17%
assets/admin/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%