89% easy-image-gallery

Code Review | Easy Image Gallery

WordPress plugin Easy Image Gallery scored 89% from 54 tests.

About plugin

  • Plugin page: easy-image-gallery
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2013
  • Latest release: Nov 10, 2022
  • Number of updates: 57
  • Update frequency: every 60.1 days
  • Top authors: sumobi (49.12%)devrix (47.37%)nofearinc (7.02%)

Code review

54 tests

User reviews

41 reviews

Install metrics

8,000+ active / 204,604 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.55ms] Passed 4 tests

Analyzing server-side resources used by Easy Image Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.34 ▲0.06
Dashboard /wp-admin3.32 ▲0.0145.70 ▼0.47
Posts /wp-admin/edit.php3.37 ▲0.0150.27 ▲0.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.75 ▲5.47
Media Library /wp-admin/upload.php3.24 ▲0.0139.44 ▲2.43

Server storage [IO: ▲2.97MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 193 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Image Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲12713.69 ▼0.579.90 ▲8.1639.75 ▼6.58
Dashboard /wp-admin2,226 ▲234.89 ▼0.90107.30 ▲10.0241.99 ▲4.07
Posts /wp-admin/edit.php2,109 ▲202.01 ▼0.0439.54 ▼2.6936.01 ▲1.95
Add New Post /wp-admin/post-new.php6,593 ▲5,06020.47 ▼2.701,056.14 ▲370.3555.23 ▼1.71
Media Library /wp-admin/upload.php1,408 ▲174.13 ▼0.06108.68 ▲4.4847.46 ▲0.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5, #6, #7 in easy-image-gallery/assets to your readme.txt
Please take inspiration from this readme.txt

easy-image-gallery/easy-image-gallery.php Passed 13 tests

The principal PHP file in "Easy Image Gallery" v. 1.5.1 is loaded by WordPress automatically on each request
57 characters long description:
An easy to use image gallery with drag & drop re-ordering

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected28,203 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
JSON60017,476
JavaScript271,9739996,782
CSS13288642,270
PHP9289279890
Markdown41040286
Sass341136
LESS1280122
HTML1170104
PO File2313298
YAML10121
SVG11018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
86 PNG files occupy 1.66MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/gutenberg-block/dist/lib/fancybox/helpers/fancybox_buttons.png1.05KB1.10KB0.00%
includes/gutenberg-block/dist/lib/fancybox/fancy_nav_left.png1.41KB1.64KB0.00%
includes/lib/images/prettyPhoto/facebook/contentPatternTop.png0.14KB0.11KB▼ 21.13%
includes/lib/images/prettyPhoto/dark_rounded/btnNext.png1.38KB1.14KB▼ 17.29%
includes/gutenberg-block/dist/lib/fancybox/fancy_loading.png9.96KB6.30KB▼ 36.67%