72% easy-media-gallery

Code Review | Gallery – Photo Albums Plugin

WordPress plugin Gallery – Photo Albums Plugin scored72%from 54 tests.

About plugin

  • Plugin page: easy-media-gallery
  • Plugin version: 1.3.170
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3
  • WordPress version: 6.3.1
  • First release: Mar 8, 2013
  • Latest release: Aug 9, 2023
  • Number of updates: 2,373
  • Update frequency: every 1.6 days
  • Top authors: GhozyLab (100%)

Code review

54 tests

User reviews

277 reviews

Install metrics

3,000+ active /1,603,501 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲3.52ms] 75% from 4 tests

An overview of server-side resources used by Gallery – Photo Albums Plugin
Please take the time to fix the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 716.67ms on /wp-admin/edit.php?post_type=easymediagallery&page=emg-premium-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.12 ▼0.43
Dashboard /wp-admin3.57 ▲0.26505.10 ▲449.70
Posts /wp-admin/edit.php3.53 ▲0.1848.66 ▲1.50
Add New Post /wp-admin/post-new.php6.11 ▲0.22102.49 ▲7.29
Media Library /wp-admin/upload.php3.40 ▲0.1839.18 ▲5.72
Easy Media Gallery Lite Changelog /wp-admin/edit.php?post_type=easymediagallery&page=emg-changelog3.4836.52
Demo /wp-admin/edit.php?post_type=easymediagallery&page=emg-demo3.3834.97
Earn EXTRA MONEY /wp-admin/edit.php?post_type=easymediagallery&page=emg-earn-xtra-money3.3734.60
Free Install Plugins /wp-admin/edit.php?post_type=easymediagallery&page=emg-free-plugins3.44612.09
Categories /wp-admin/edit-tags.php?taxonomy=emediagallery&post_type=easymediagallery3.4037.11
Sorter /wp-admin/edit.php?post_type=easymediagallery&page=easymedia-order3.3833.81
UPGRADE to PRO /wp-admin/edit.php?post_type=easymediagallery&page=comparison3.3731.73
Settings /wp-admin/edit.php?post_type=easymediagallery&page=emg_settings3.3934.83
What's NewNEW /wp-admin/edit.php?post_type=easymediagallery&page=emg-whats-new3.40905.63
Premium Plugins /wp-admin/edit.php?post_type=easymediagallery&page=emg-premium-plugins3.40716.67

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 304 new files
Database: no new tables, 8 new options
New WordPress options
widget_emg-widget
widget_theysaidso_widget
easy_media_opt
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Gallery – Photo Albums Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,133 ▲37613.73 ▼0.666.97 ▲4.7842.28 ▼4.86
Dashboard /wp-admin2,389 ▲1984.99 ▼0.91105.26 ▼4.1289.42 ▲41.68
Posts /wp-admin/edit.php2,203 ▲1142.09 ▲0.0637.35 ▼1.5033.26 ▼0.62
Add New Post /wp-admin/post-new.php6,783 ▲5,24822.24 ▼1.06861.68 ▲181.18120.94 ▲65.33
Media Library /wp-admin/upload.php1,502 ▲1144.27 ▲0.09115.69 ▲8.1745.90 ▼2.59
Easy Media Gallery Lite Changelog /wp-admin/edit.php?post_type=easymediagallery&page=emg-changelog3,7151.8128.9780.51
Demo /wp-admin/edit.php?post_type=easymediagallery&page=emg-demo1,5268.84242.4185.72
Earn EXTRA MONEY /wp-admin/edit.php?post_type=easymediagallery&page=emg-earn-xtra-money1,0522.1027.7570.02
Free Install Plugins /wp-admin/edit.php?post_type=easymediagallery&page=emg-free-plugins1,5172.1829.8845.28
Categories /wp-admin/edit-tags.php?taxonomy=emediagallery&post_type=easymediagallery1,3762.2129.5533.47
Sorter /wp-admin/edit.php?post_type=easymediagallery&page=easymedia-order9501.8829.1927.67
UPGRADE to PRO /wp-admin/edit.php?post_type=easymediagallery&page=comparison1,9691.6827.0660.38
Settings /wp-admin/edit.php?post_type=easymediagallery&page=emg_settings2,3122.7460.1080.77
What's NewNEW /wp-admin/edit.php?post_type=easymediagallery&page=emg-whats-new1,0181.7226.1346.30
Premium Plugins /wp-admin/edit.php?post_type=easymediagallery&page=emg-premium-plugins1,0201.8726.3243.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 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 8 options in the database
    • easy_media_opt
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_emg-widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/easy-media-gallery/easy-media-gallery.php
    • > /wp-content/plugins/easy-media-gallery/includes/tinymce_plugin/register_mce_button.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-media-gallery/includes/frontend.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-media-gallery/includes/pages/emg-pricing.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-media-gallery/includes/emg-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/easy-media-gallery/includes/shortcode.php:264
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-media-gallery/includes/metaboxes.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-media-gallery/includes/easywidget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=easymediagallery&page=emg-demo
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/edit.php?post_type=easymediagallery&page=emg-demo
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

easy-media-gallery/easy-media-gallery.php 92% from 13 tests

The main file in "Gallery – Photo Albums Plugin" v. 1.3.170 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 keep the plugin description shorter than 140 characters (currently 351 characters long)

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
There were no executable files found in this plugin26,581 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PO File274,3445,50012,624
PHP231,6857206,060
CSS256742504,501
JavaScript314214193,152
SVG201244

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.33
▷ Minimum class complexity3.00
▷ Maximum class complexity19.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions130
▷ Named functions12999.23%
▷ Anonymous functions10.77%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
138 PNG files occupy 1.07MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/gray-grad.png0.21KB0.18KB▼ 11.74%
css/images/magnify/Icon-4.png3.50KB1.20KB▼ 65.81%
css/images/arrow_left.png3.35KB0.70KB▼ 79.07%
includes/images/colorpicker/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
css/images/arrow_right_minimal.png3.41KB0.81KB▼ 76.18%