68% edge-gallery

Code Review | Wordpress Gallery Plugin - Edge Photo Gallery

WordPress plugin Wordpress Gallery Plugin - Edge Photo Gallery scored 68% from 54 tests.

About plugin

  • Plugin page: edge-gallery
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Oct 20, 2017
  • Latest release: Dec 29, 2020
  • Number of updates: 62
  • Update frequency: every 18.8 days
  • Top authors: edgegalleryplugin (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

70+ active / 2,679 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.43MB] [CPU: ▼271.75ms] Passed 4 tests

An overview of server-side resources used by Wordpress Gallery Plugin - Edge Photo Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /8.34 ▲4.8284.73 ▲34.00
Dashboard /wp-admin8.36 ▲4.9564.80 ▲31.38
Posts /wp-admin/edit.php8.36 ▲4.7267.04 ▲29.62
Add New Post /wp-admin/post-new.php10.23 ▲3.26119.83 ▼1,182.01
Media Library /wp-admin/upload.php8.36 ▲5.0661.58 ▲37.61
Add New /wp-admin/post-new.php?post_type=edgegallery8.3669.24
Gallery Settings /wp-admin/edit.php?post_type=edgegallery&page=gallery_settings8.3652.25
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius8.3651.62
All Galleries /wp-admin/edit.php?post_type=edgegallery8.3652.74

Server storage [IO: ▲4.49MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 205 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_gdpr
fs_accounts
fs_debug_mode

Browser metrics Passed 4 tests

Wordpress Gallery Plugin - Edge Photo Gallery: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,007 ▲26516.41 ▲0.439.74 ▲3.152.11 ▼0.60
Dashboard /wp-admin2,980 ▲1226.33 ▲0.18120.63 ▼20.55171.53 ▲15.57
Posts /wp-admin/edit.php2,777 ▲833.28 ▲0.0464.19 ▼1.19155.88 ▲13.07
Add New Post /wp-admin/post-new.php1,707 ▲4618.90 ▼2.79469.05 ▲46.84161.50 ▲7.17
Media Library /wp-admin/upload.php1,781 ▲835.58 ▲0.10144.58 ▼0.53208.23 ▲21.94
Add New /wp-admin/post-new.php?post_type=edgegallery2,9925.78104.45173.24
Gallery Settings /wp-admin/edit.php?post_type=edgegallery&page=gallery_settings1,0802.6155.77113.98
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4972.8658.23113.05
All Galleries /wp-admin/edit.php?post_type=edgegallery1,4803.2063.97128.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/edge-gallery/freemius/includes/class-freemius.php+8540
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 4 options in the database
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/edge-gallery/freemius/templates/ajax-loader.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/edge-gallery/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/edge-gallery/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/edge-gallery/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/edge-gallery/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/edge-gallery/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/edge-gallery/includes/metaboxes.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/edge-gallery/includes/functions.php:84
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/edge-gallery/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/edge-gallery/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/edge-gallery/freemius/templates/account/partials/addon.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Version format is invalid
You can look at the official readme.txt

edge-gallery/edge-gallery.php 92% from 13 tests

The main file in "Wordpress Gallery Plugin - Edge Photo Gallery" v. 2.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)

Code Analysis 97% from 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 plugin42,017 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP1107,37616,18231,616
JavaScript71,2803194,198
CSS17127943,519
SVG2102,684

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity88.96
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods1,137
▷ Static methods17315.22%
▷ Public methods79569.92%
▷ Protected methods151.32%
▷ Private methods32728.76%
Functions121
▷ Named functions12099.17%
▷ Anonymous functions10.83%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.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
20 PNG files occupy 0.24MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-board-hover.png4.97KB2.18KB▼ 56.03%
images/GalleryEditPremium04.png16.48KB7.41KB▼ 55.04%
images/Settings.png77.81KB16.49KB▼ 78.81%
images/icon-board.png4.81KB2.09KB▼ 56.53%
images/remove-icons-white.png2.70KB0.49KB▼ 81.85%