84% new-simple-gallery

Code Review | New Simple Gallery

WordPress plugin New Simple Gallery scored84%from 54 tests.

About plugin

  • Plugin page: new-simple-gallery
  • Plugin version: 8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2010
  • Latest release: Dec 1, 2022
  • Number of updates: 67
  • Update frequency: every 67.1 days
  • Top authors: gopiplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /15,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by New Simple Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.74 ▼4.21
Dashboard /wp-admin3.31 ▲0.0146.11 ▼3.64
Posts /wp-admin/edit.php3.36 ▲0.0144.88 ▼1.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.44 ▲0.20
Media Library /wp-admin/upload.php3.24 ▲0.0131.71 ▼4.21
New simple gallery /wp-admin/options-general.php?page=new-simple-gallery3.2831.81

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: 1 new table, 6 new options
New tables
wp_new_simple_gallery
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for New Simple Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.82 ▼0.938.76 ▲7.0042.52 ▼2.08
Dashboard /wp-admin2,207 ▲195.77 ▼0.11101.69 ▼13.6242.13 ▼3.15
Posts /wp-admin/edit.php2,093 ▲42.05 ▼0.0037.72 ▲1.1631.43 ▼3.94
Add New Post /wp-admin/post-new.php1,517 ▼217.78 ▼5.63638.06 ▼36.3872.77 ▲19.20
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.0795.32 ▼6.5942.64 ▼2.13
New simple gallery /wp-admin/options-general.php?page=new-simple-gallery1,0092.0326.1325.79

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/new-simple-gallery/new-simple-gallery.php
    • > /wp-content/plugins/new-simple-gallery/pages/image-management-add.php
    • > /wp-content/plugins/new-simple-gallery/pages/image-management-edit.php
    • > /wp-content/plugins/new-simple-gallery/pages/image-management-show.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: gallery, images, slideshow

new-simple-gallery/new-simple-gallery.php 92% from 13 tests

The entry point to "New Simple Gallery" version 8.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 245 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,188 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP56441691
JavaScript21717262
PO File2121205235

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/image-icon.png0.61KB0.66KB0.00%