78% gallery-made-easy

Code Review | Gallery Made Easy

WordPress plugin Gallery Made Easy scored78%from 54 tests.

About plugin

  • Plugin page: gallery-made-easy
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 25, 2016
  • Latest release: Jul 25, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: raeven (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,157 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.05MB] [CPU: ▼0.57ms] Passed 4 tests

This is a short check of server-side resources used by Gallery Made Easy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.17 ▲0.09
Dashboard /wp-admin3.35 ▲0.0454.33 ▲4.27
Posts /wp-admin/edit.php3.40 ▲0.0450.23 ▼1.74
Add New Post /wp-admin/post-new.php5.95 ▲0.0697.93 ▼4.89
Media Library /wp-admin/upload.php3.27 ▲0.0441.16 ▲8.11
Galleries /wp-admin/edit.php?post_type=w3b_gallery3.3138.81
Add New /wp-admin/post-new.php?post_type=w3b_gallery3.3757.50
Settings /wp-admin/edit.php?post_type=w3b_gallery&page=w3b-gallery3.2832.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Gallery Made Easy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20713.92 ▼0.4510.83 ▲8.9742.22 ▲1.50
Dashboard /wp-admin2,233 ▲535.84 ▲0.1695.07 ▲7.5681.74 ▲42.31
Posts /wp-admin/edit.php2,157 ▲572.38 ▲0.3535.46 ▼0.3030.87 ▼3.37
Add New Post /wp-admin/post-new.php1,588 ▲6223.33 ▼0.16699.88 ▲30.5837.04 ▼19.77
Media Library /wp-admin/upload.php1,450 ▲504.37 ▲0.12114.11 ▲9.2289.08 ▲42.83
Galleries /wp-admin/edit.php?post_type=w3b_gallery1,1292.2033.1132.76
Add New /wp-admin/post-new.php?post_type=w3b_gallery1,7863.7472.8697.09
Settings /wp-admin/edit.php?post_type=w3b_gallery&page=w3b-gallery9061.8126.4633.85

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gallery-made-easy/template/template.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gallery-made-easy/views/settings.php:2
    • > PHP Notice
      Undefined variable: w3b_gallery in wp-content/plugins/gallery-made-easy/template/template.php on line 5
    • > PHP Warning
      include(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/gallery-made-easy/gallery-made-easy.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/gallery-made-easy/views/metabox.php:21
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gallery-made-easy/gallery-made-easy.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gallery-made-easy/gallery-made-easy.php:55
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gallery-made-easy/views/metabox_side.php:7
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gallery-made-easy/gallery-made-easy.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === gallery-made-easy === )
Please take inspiration from this readme.txt

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

This is the main PHP file of "Gallery Made Easy" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
127 characters long description:
Instantly create responsive image galleries within a simple and customizable interface. Just upload, add, organise and publish.

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 detected6,561 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript261,2825514,325
CSS1146261,787
PHP58725408
SVG10041

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2692.86%
▷ Protected methods00.00%
▷ Private methods27.14%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
js/light-gallery/img/youtube-play.png5.06KB2.37KB▼ 53.04%
js/light-gallery/img/vimeo-play.png5.30KB1.56KB▼ 70.65%
css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%