84% justified-image-gallery

Code Review | Justified Image Gallery

WordPress plugin Justified Image Gallery scored 84% from 54 tests.

About plugin

  • Plugin page: justified-image-g...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: Nov 24, 2016
  • Number of updates: 6
  • Update frequency: every 163.5 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 8,892 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: ▼1.94ms] Passed 4 tests

A check of server-side resources used by Justified Image Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.95 ▼1.56
Dashboard /wp-admin3.31 ▲0.0144.60 ▲1.23
Posts /wp-admin/edit.php3.36 ▲0.0145.46 ▼4.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.22 ▼0.19
Media Library /wp-admin/upload.php3.23 ▲0.0133.07 ▼1.46

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Justified Image Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲20214.09 ▼0.655.26 ▲3.3338.28 ▼6.57
Dashboard /wp-admin2,217 ▲254.92 ▼0.05112.77 ▼5.2441.39 ▼2.73
Posts /wp-admin/edit.php2,100 ▲142.04 ▲0.0739.52 ▲3.3033.76 ▲5.70
Add New Post /wp-admin/post-new.php1,525 ▼1423.26 ▼0.01662.74 ▲3.9053.23 ▼5.70
Media Library /wp-admin/upload.php1,399 ▲84.14 ▼0.08100.45 ▼5.3741.97 ▲0.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/justified-image-gallery/index.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/justified-image-gallery/index.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Gallery View.)
The official readme.txt might help

justified-image-gallery/index.php 92% from 13 tests

The main file in "Justified Image Gallery" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("justified-image-gallery.php" instead of "index.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
No dangerous file extensions were detected588 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP218873483
CSS24969
JavaScript240636

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.45MB with 0.32MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png461.30KB135.56KB▼ 70.61%