63% wc-gallery

Code Review | Galleries by Angie Makes

WordPress plugin Galleries by Angie Makes scored 63% from 54 tests.

About plugin

  • Plugin page: wc-gallery
  • Plugin version: 1.67
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.0.3
  • WordPress version: 5.8.1
  • First release: Nov 15, 2013
  • Latest release: Jan 11, 2019
  • Number of updates: 123
  • Update frequency: every 15.3 days
  • Top authors: cbaldelomar (100%)

Code review

54 tests

User reviews

49 reviews

Install metrics

20,000+ active / 308,216 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.40MB] [CPU: ▼179.82ms] Passed 4 tests

An overview of server-side resources used by Galleries by Angie Makes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼0.736.78 ▼20.80
Dashboard /wp-admin2.26 ▼0.818.03 ▼45.43
Posts /wp-admin/edit.php2.26 ▼0.8510.94 ▼25.98
Add New Post /wp-admin/post-new.php2.26 ▼3.1810.92 ▼627.05
Media Library /wp-admin/upload.php2.26 ▼0.758.21 ▼18.91
Gallery /wp-admin/themes.php?page=wc-gallery2.268.22

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 79 new files
Database: no new tables, 41 new options
New WordPress options
wc_gallery_small_size_h
wc_gallery_icon_size_h
wc_gallery_big_enable
wc_gallery_big_size_h
wc_gallery_square_crop
wc_gallery_small_enable
wc_gallery_standard_enable
wc_gallery_fixedheightsmall_enable
wc_gallery_carousel_size_h
wc_gallery_slider_enable
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Galleries by Angie Makes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲19616.33 ▲0.288.98 ▲3.7580.12 ▲5.35
Dashboard /wp-admin2,935 ▲406.12 ▼0.15115.08 ▼17.26166.79 ▼9.63
Posts /wp-admin/edit.php2,745 ▲53.23 ▼0.0064.05 ▼1.34139.53 ▼5.64
Add New Post /wp-admin/post-new.php3,749 ▲5118.79 ▲1.05455.62 ▲5.55158.46 ▼9.20
Media Library /wp-admin/upload.php1,758 ▲65.53 ▲0.02136.13 ▼3.03189.47 ▼2.11
Gallery /wp-admin/themes.php?page=wc-gallery2,1034.9773.64125.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wc-gallery/includes/functions.php+758
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 41 options in the database
    • wc_gallery_carouselsmall_enable
    • wc_gallery_carousel_enable
    • wc_gallery_slider_size_h
    • wc_gallery_carousel_size_w
    • wc_gallery_current_version
    • wc_gallery_fixedheight_size_w
    • wc_gallery_fixedheightmedium_size_h
    • wc_gallery_square_size_h
    • wc_gallery_icon_enable
    • wc_gallery_square_enable
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=wc-gallery
    • > Notice in wp-content/plugins/wc-gallery/includes/functions.php+761
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/themes.php?page=wc-gallery
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=wc-gallery
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=wc-gallery
    • > Deprecated in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/tabs.php+69
    implode(): Passing glue string after array is deprecated. Swap the parameters

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/custom-checkboxes.php
    • > /wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/custom-dropdown.php
    • > /wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/custom-radio.php
    • > /wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/group.php
    • > /wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/order-show-hide.php
  • 58× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/custom-radio.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/group.php on line 3
    • > PHP Notice
      Undefined variable: option_name in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/image-field.php on line 13
    • > PHP Notice
      Undefined variable: option_name in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/textarea-field.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/positive-number-input-field.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/positive-pixel-input-field.php:9
    • > PHP Notice
      Undefined variable: selection in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/order-show-hide.php on line 2
    • > PHP Notice
      Undefined variable: option_name in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/custom-dropdown.php on line 10
    • > PHP Notice
      Undefined variable: val in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/settings/order-show-hide.php on line 10
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wc-gallery/includes/vendors/wpc-settings-framework/views/group.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: slider gallery, pinterest style gallery, pinterest gallery, carousel gallery, gallery slider...

wc-gallery/wc-gallery.php Passed 13 tests

This is the main PHP file of "Galleries by Angie Makes" version 1.67, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
91 characters long description:
Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected7,608 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript147481,1003,610
PHP293743882,391
CSS111092701,191
Markdown32490396
SVG20020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity218.00
▷ Minimum class complexity218.00
▷ Maximum class complexity218.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods56
▷ Static methods11.79%
▷ Public methods5598.21%
▷ Protected methods00.00%
▷ Private methods11.79%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
8 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/vendors/flexslider/images/slide-arrow-right.png2.95KB0.14KB▼ 95.20%
includes/vendors/flexslider/images/slide-arrow-left.png2.94KB0.14KB▼ 95.12%
includes/vendors/flexslider/images/slide-arrows.png3.38KB0.20KB▼ 94.23%
includes/vendors/owlcarousel/assets/slide-arrow-left.png2.94KB0.14KB▼ 95.12%
includes/vendors/flexslider/images/bg_play_pause.png1.51KB0.52KB▼ 65.52%