68% wp-simple-galleries

Code Review | WP Simple Galleries

WordPress plugin WP Simple Galleries scored68%from 54 tests.

About plugin

  • Plugin page: wp-simple-galleries
  • Plugin version: 1.34
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-3.5
  • WordPress version: 6.3.1
  • First release: Dec 20, 2011
  • Latest release: Apr 15, 2013
  • Number of updates: 73
  • Update frequency: every 6.6 days
  • Top authors: maca134 (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

2,000+ active /63,774 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: ▼0.81MB] [CPU: ▼36.16ms] Passed 4 tests

An overview of server-side resources used by WP Simple Galleries
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1538.53 ▼1.34
Dashboard /wp-admin3.15 ▼0.2024.00 ▼37.50
Posts /wp-admin/edit.php3.15 ▼0.2123.91 ▼27.32
Add New Post /wp-admin/post-new.php3.15 ▼2.7425.49 ▼75.81
Media Library /wp-admin/upload.php3.15 ▼0.0827.78 ▼4.00

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 91 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
wpsimplegallery
can_compress_scripts
db_upgraded
widget_theysaidso_widget
wpsg_optionsframework
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Simple Galleries
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,117 ▲38214.02 ▲0.678.16 ▲3.7944.87 ▲1.26
Dashboard /wp-admin2,259 ▲674.95 ▲0.04115.77 ▲6.2090.53 ▲45.21
Posts /wp-admin/edit.php2,142 ▲532.13 ▲0.0740.53 ▲0.7732.90 ▼5.16
Add New Post /wp-admin/post-new.php1,688 ▲16422.33 ▼1.05645.51 ▲21.5761.13 ▲7.32
Media Library /wp-admin/upload.php1,435 ▲474.34 ▲0.1598.30 ▼0.2566.83 ▲21.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/wp-simple-galleries/wp-simple-gallery.php+75
    Invalid argument supplied for foreach()
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • wpsg_optionsframework
    • wpsimplegallery
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-simple-galleries/admin/options-framework.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-simple-galleries/admin/options-sanitize.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-simple-galleries/wp-simple-gallery.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-simple-galleries/admin/options-medialibrary-uploader.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This is an example of what is displayed on a post.), #2 (This is an example of editting a post.)
The official readme.txt might help

wp-simple-galleries/wp-simple-gallery.php 92% from 13 tests

The primary PHP file in "WP Simple Galleries" version 1.34 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-simple-galleries.php" instead of "wp-simple-gallery.php")

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
Success! There were no dangerous files found in this plugin4,093 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP74304222,161
JavaScript66553717
CSS91868709
PO File4164226506

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity122.50
▷ Minimum class complexity39.00
▷ Maximum class complexity206.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods52
▷ Static methods47.69%
▷ Public methods1834.62%
▷ Protected methods3057.69%
▷ Private methods47.69%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants55
▷ Global constants55100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
46 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/colorpicker/colorpicker_hex.png0.52KB0.42KB▼ 19.92%
colorbox/themes/theme4/images/ie6/borderTopCenter.png0.15KB0.19KB0.00%
colorbox/themes/theme1/images/ie6/borderBottomLeft.png0.21KB0.20KB▼ 4.19%
colorbox/themes/theme1/images/ie6/borderTopRight.png0.21KB0.20KB▼ 2.34%
colorbox/themes/theme1/images/ie6/borderTopLeft.png0.21KB0.20KB▼ 4.63%