72% wp-flickr-gallery

Code Review | Album And Photo Gallery For Flickr - Album Flickr Widget

WordPress plugin Album And Photo Gallery For Flickr - Album Flickr Widget scored72%from 54 tests.

About plugin

  • Plugin page: wp-flickr-gallery
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2017
  • Latest release: Oct 20, 2023
  • Number of updates: 125
  • Update frequency: every 19.4 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

2,000+ active /64,077 total downloads

Benchmarks

Plugin footprint 82% from 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.51MB] [CPU: ▼2.93ms] 75% from 4 tests

An overview of server-side resources used by Album And Photo Gallery For Flickr - Album Flickr Widget
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 513.29ms on /wp-admin/edit.php?post_type=flickr_gallery&page=ag-featured-page)
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5237.90 ▼5.21
Dashboard /wp-admin3.85 ▲0.5450.22 ▲0.23
Posts /wp-admin/edit.php3.90 ▲0.5451.46 ▲5.53
Add New Post /wp-admin/post-new.php6.38 ▲0.4994.60 ▼12.26
Media Library /wp-admin/upload.php3.71 ▲0.4841.80 ▲8.46
Our Theme /wp-admin/edit.php?post_type=flickr_gallery&page=sr-theme-page3.6835.18
All Flickr Gallery /wp-admin/edit.php?post_type=flickr_gallery3.7138.56
Docs /wp-admin/edit.php?post_type=flickr_gallery&page=ag-doc-page3.6835.30
Add Flickr Gallery /wp-admin/post-new.php?post_type=flickr_gallery3.9449.43
Flickr API Settings /wp-admin/edit.php?post_type=flickr_gallery&page=fg-api-settings3.6943.40
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.7836.78
Featured Plugin /wp-admin/edit.php?post_type=flickr_gallery&page=ag-featured-page3.90513.29

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Album And Photo Gallery For Flickr - Album Flickr Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲16613.47 ▼1.067.71 ▲5.9040.75 ▼6.52
Dashboard /wp-admin2,279 ▲995.64 ▲0.0492.29 ▲3.2740.88 ▲0.78
Posts /wp-admin/edit.php2,190 ▲902.02 ▼0.0142.08 ▲0.5542.08 ▲5.79
Add New Post /wp-admin/post-new.php1,595 ▲5923.22 ▲4.90704.39 ▲84.7458.64 ▼20.39
Media Library /wp-admin/upload.php1,486 ▲864.36 ▲0.1795.31 ▲1.2743.71 ▲3.28
Our Theme /wp-admin/edit.php?post_type=flickr_gallery&page=sr-theme-page1,0142.2126.6581.28
All Flickr Gallery /wp-admin/edit.php?post_type=flickr_gallery1,1682.0034.1033.96
Docs /wp-admin/edit.php?post_type=flickr_gallery&page=ag-doc-page9432.0526.0036.92
Add Flickr Gallery /wp-admin/post-new.php?post_type=flickr_gallery2,4464.5688.74309.13
Flickr API Settings /wp-admin/edit.php?post_type=flickr_gallery&page=fg-api-settings9502.1233.2028.50
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0882.0322.8730.72
Featured Plugin /wp-admin/edit.php?post_type=flickr_gallery&page=ag-featured-page3,0921.4833.18155.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=flickr_gallery
    • > Notice in wp-content/plugins/wp-flickr-gallery/wp-flickr-gallery.php+109
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=flickr_gallery
    • > Notice in wp-content/plugins/wp-flickr-gallery/wp-flickr-gallery.php+109
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=flickr_gallery
    • > Notice in wp-content/plugins/wp-flickr-gallery/flickr-post-settings.php+124
    Trying to access array offset on value of type bool

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
Please fix the following
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wp-flickr-gallery/class-tgm-plugin-activation.php:2129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/wp-flickr-gallery/our-theme/awp-theme.php:3
    • > PHP Notice
      Undefined variable: flickr_user_id in wp-content/plugins/wp-flickr-gallery/flickr-get-album.php on line 5
    • > PHP Notice
      Undefined variable: flickr_api_key in wp-content/plugins/wp-flickr-gallery/flickr-get-album.php on line 4
    • > PHP Notice
      Undefined variable: flickr_album_method in wp-content/plugins/wp-flickr-gallery/flickr-get-album.php on line 7
    • > PHP Notice
      Undefined variable: flickr_album_id in wp-content/plugins/wp-flickr-gallery/flickr-get-album.php on line 6
    • > PHP Notice
      Undefined variable: flickr_user_id in wp-content/plugins/wp-flickr-gallery/flickr-get-photostream.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/wp-flickr-gallery/featured-plugins/featured-plugins.php:3
    • > PHP Notice
      Undefined variable: apply_light_box in wp-content/plugins/wp-flickr-gallery/flickr-get-photostream.php on line 107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_get() in wp-content/plugins/wp-flickr-gallery/flickr-get-album.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=flickr_gallery&page=sr-theme-page
    • > Network (severe)
    wp-content/plugins/wp-flickr-gallery/our-theme/js/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=flickr_gallery&page=ag-featured-page
    • > Network (severe)
    wp-content/plugins/wp-flickr-gallery/js/featured-plugins/acl-media-upload-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=flickr_gallery&page=ag-featured-page
    • > Network (severe)
    wp-content/plugins/wp-flickr-gallery/js/featured-plugins/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 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
5 plugin tags: album gallery, flickr profile, feed, flickr photo gallery, flickr widget

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

This is the main PHP file of "Album And Photo Gallery For Flickr - Album Flickr Widget" version 1.3.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
A Newly Amazing Different Most Powerful Responsive Easy To Use Flickr Plugin For WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected45,892 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
CSS141,5922,16930,182
JavaScript111,1758866,090
SVG8005,940
PHP116551,7573,512
PO File17481168

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity43.12
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods121
▷ Static methods54.13%
▷ Public methods9679.34%
▷ Protected methods2520.66%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.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
5 PNG files occupy 1.08MB with 0.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/pricing-table.png42.01KB18.43KB▼ 56.12%
img/pricing-table2.png80.53KB29.22KB▼ 63.72%
img/flickr-responsive-image.png698.25KB228.98KB▼ 67.21%
img/featured-Image.png124.62KB39.09KB▼ 68.64%
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%