10% unc-gallery

Code Review | Uncovery Gallery

WordPress plugin Uncovery Gallery scored10%from 54 tests.

About plugin

  • Plugin page: unc-gallery
  • Plugin version: 4.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.6
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: Aug 17, 2016
  • Number of updates: 31
  • Update frequency: every 4.8 days
  • Top authors: uncovery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,405 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/unc-gallery/unc_image.inc.php+701
    Methods with the same name as their class will not be constructors in a future version of PHP; iptc has a deprecated constructor

Server metrics [RAM: ▼1.44MB] [CPU: ▼47.57ms] Passed 4 tests

Server-side resources used by Uncovery Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.54 ▼0.927.61 ▼32.70
Dashboard /wp-admin2.56 ▼0.748.74 ▼37.20
Posts /wp-admin/edit.php2.56 ▼0.797.59 ▼41.16
Add New Post /wp-admin/post-new.php2.56 ▼3.328.71 ▼79.23
Media Library /wp-admin/upload.php2.56 ▼0.669.59 ▼24.04

Server storage [IO: ▲5.44MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Just a few items left to fix
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/unc-gallery/" and "wp-content/uploads/"
    • (new file) wp-content/unc_gallery/.empty
Filesystem: 69 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Uncovery Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,039 ▲29313.88 ▼0.548.20 ▲6.5738.87 ▼5.34
Dashboard /wp-admin2,225 ▲374.90 ▼0.9898.08 ▼13.1541.14 ▼6.73
Posts /wp-admin/edit.php2,105 ▲132.05 ▲0.0133.48 ▼12.7635.50 ▼3.11
Add New Post /wp-admin/post-new.php1,555 ▲1317.92 ▼0.49620.18 ▲8.5048.72 ▲0.19
Media Library /wp-admin/upload.php1,404 ▲194.24 ▲0.0691.26 ▼6.2542.47 ▼0.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/unc-gallery/unc_image.inc.php+701
    Methods with the same name as their class will not be constructors in a future version of PHP; iptc has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Congratulations! This plugin passed the SRP test

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: photos, photoblog, date, photo, gallery

unc-gallery/unc_gallery.php 92% from 13 tests

The main file in "Uncovery Gallery" v. 4.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("unc-gallery.php" instead of "unc_gallery.php")

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
There were no executable files found in this plugin4,934 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP97041,0263,592
CSS51631541,033
Markdown1830198
JavaScript41457110
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity84.50
▷ Minimum class complexity10.00
▷ Maximum class complexity159.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods54
▷ Static methods11.85%
▷ Public methods1527.78%
▷ Protected methods3972.22%
▷ Private methods00.00%
Functions78
▷ Named functions78100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
34 PNG files occupy 4.78MB with 1.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/prev.png1.33KB1.59KB0.00%
images/screenshot-15.png19.61KB9.47KB▼ 51.70%
images/screenshot-13.png493.42KB139.83KB▼ 71.66%
images/screenshot-6.png7.44KB4.16KB▼ 44.17%
css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%