94% flickr-justified-gallery

Code Review | Flickr Justified Gallery

WordPress plugin Flickr Justified Gallery scored 94% from 54 tests.

About plugin

  • Plugin page: flickr-justified-...
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 5.9.2
  • First release: Dec 28, 2014
  • Latest release: Mar 24, 2018
  • Number of updates: 23
  • Update frequency: every 51.4 days
  • Top authors: miro.mannino (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

8,000+ active / 129,689 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼301.43ms] Passed 4 tests

A check of server-side resources used by Flickr Justified Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2164.59 ▲9.10
Dashboard /wp-admin3.57 ▲0.1734.43 ▼29.85
Posts /wp-admin/edit.php3.81 ▲0.1741.99 ▲5.26
Add New Post /wp-admin/post-new.php7.04 ▲0.0895.19 ▼1,187.97
Media Library /wp-admin/upload.php3.46 ▲0.1731.40 ▲6.86
Flickr Justified Gallery /wp-admin/options-general.php?page=fjgwpp3.4334.02

Server storage [IO: ▲2.11MB] [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: 38 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Flickr Justified Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,892 ▲16616.35 ▲0.699.62 ▲4.102.37 ▼0.09
Dashboard /wp-admin2,880 ▲196.11 ▼0.13124.05 ▼15.20198.27 ▲37.71
Posts /wp-admin/edit.php2,690 ▲203.23 ▼0.0164.35 ▼16.64143.48 ▼24.16
Add New Post /wp-admin/post-new.php1,639 ▼018.16 ▲1.85413.83 ▼36.68155.87 ▲10.13
Media Library /wp-admin/upload.php1,700 ▲55.49 ▼0.04175.74 ▲23.89204.57 ▲8.02
Flickr Justified Gallery /wp-admin/options-general.php?page=fjgwpp2,1792.3860.25170.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/flickr-justified-gallery/phpFlickr/example.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/flickr-justified-gallery/phpFlickr/example.php on line 21
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/flickr-justified-gallery/phpFlickr_a1/example.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/flickr-justified-gallery/flickr-justified-gallery-settings.php:26
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/flickr-justified-gallery/phpFlickr_a1/example.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/flickr-justified-gallery/flickr-justified-gallery.php:45

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (A typical photostream), #2 (A photostream with more pages), #3 (The captions)
You can look at the official readme.txt

flickr-justified-gallery/flickr-justified-gallery.php Passed 13 tests

Analyzing the main PHP file in "Flickr Justified Gallery" version 3.5
89 characters long description:
Shows the Flickr photostream, sets and galleries, with an high quality justified gallery.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin4,482 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP76867663,450
PO File2385876796
Markdown1530174
CSS452240
JavaScript421721
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity99.25
▷ Minimum class complexity13.00
▷ Maximum class complexity187.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods402
▷ Static methods00.00%
▷ Public methods402100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lightboxes/swipebox/img/icons.png0.71KB0.43KB▼ 39.64%
lightboxes/colorbox/images/controls.png0.49KB0.57KB0.00%