78% srizon-flickr-gallery-basic

Code Review | Srizon Responsive Flickr Gallery Basic

WordPress plugin Srizon Responsive Flickr Gallery Basic scored78%from 54 tests.

About plugin

  • Plugin page: srizon-flickr-gal...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.0.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Dec 21, 2018
  • Number of updates: 6
  • Update frequency: every 146.0 days
  • Top authors: afzal_du (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /1,604 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼3.06ms] Passed 4 tests

Analyzing server-side resources used by Srizon Responsive Flickr Gallery Basic
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1737.01 ▼8.94
Dashboard /wp-admin3.65 ▲0.3550.81 ▲2.27
Posts /wp-admin/edit.php3.70 ▲0.3449.86 ▼2.31
Add New Post /wp-admin/post-new.php6.17 ▲0.2890.30 ▼3.26
Media Library /wp-admin/upload.php3.51 ▲0.2841.08 ▲6.97
Other's Albums /wp-admin/admin.php?page=SrzFlickr-OtherAlbums3.4635.15
Other's Galleries /wp-admin/admin.php?page=SrzFlickr-OtherGalleries3.4632.51
Common Options /wp-admin/admin.php?page=SrzFlickr3.4535.73
My Galleries /wp-admin/admin.php?page=SrzFlickr-Galleries3.4635.31
My Albums /wp-admin/admin.php?page=SrzFlickr-Albums3.4635.41

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Srizon Responsive Flickr Gallery Basic: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17413.97 ▼0.3211.52 ▲9.8348.98 ▲9.58
Dashboard /wp-admin2,221 ▲415.50 ▼0.1289.52 ▲0.2785.73 ▲44.94
Posts /wp-admin/edit.php2,135 ▲381.97 ▼0.0436.86 ▲0.3431.94 ▼5.20
Add New Post /wp-admin/post-new.php1,574 ▲3923.30 ▲5.11669.77 ▲45.6498.63 ▲28.12
Media Library /wp-admin/upload.php1,438 ▲384.18 ▲0.01101.31 ▼2.2569.43 ▲26.43
Other's Albums /wp-admin/admin.php?page=SrzFlickr-OtherAlbums8211.6625.8327.76
Other's Galleries /wp-admin/admin.php?page=SrzFlickr-OtherGalleries8041.7524.8821.45
Common Options /wp-admin/admin.php?page=SrzFlickr1,0431.8228.7337.04
My Galleries /wp-admin/admin.php?page=SrzFlickr-Galleries8211.8025.6624.73
My Albums /wp-admin/admin.php?page=SrzFlickr-Albums8181.6828.3726.58

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=SrzFlickr-Albums
    • > Notice in wp-content/plugins/srizon-flickr-gallery-basic/lib/flickr.php+329
    Undefined index: SrizonFlickrSessionOauthData
    • > GET request to /wp-admin/admin.php?page=SrzFlickr
    • > Notice in wp-content/plugins/srizon-flickr-gallery-basic/admin/srizon-flickr-common-back.php+53
    Undefined index: submit

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
  • 113× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/slider_image_above.php on line 24
    • > PHP Notice
      Undefined variable: photos in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/image_card.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/collage_thumb.php on line 11
    • > PHP Notice
      Undefined variable: srz_album in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/slider_image_above.php on line 22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/slider_image_below.php on line 21
    • > PHP Notice
      Undefined variable: srz_album in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/slider_image_below.php on line 21
    • > PHP Notice
      Undefined variable: srz_album in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/single_image.php on line 18
    • > PHP Notice
      Undefined variable: photos in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/slider_image_above.php on line 11
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/slider_image_below.php on line 21
    • > PHP Notice
      Undefined variable: photos in wp-content/plugins/srizon-flickr-gallery-basic/tmpl/single_image.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
8 plugin tags: flickr gallery, album, photo album, flickr album, gallery...

srizon-flickr-gallery-basic/srizon-flickr-gallery.php 77% from 13 tests

The main PHP script in "Srizon Responsive Flickr Gallery Basic" version 1.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("srizon-flickr-gallery-basic.php" instead of "srizon-flickr-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,072 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP292572472,225
JavaScript114184061,496
CSS8265411,351

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity22.25
▷ Minimum class complexity11.00
▷ Maximum class complexity45.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods59
▷ Static methods2440.68%
▷ Public methods3966.10%
▷ Protected methods58.47%
▷ Private methods1525.42%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants00.00%
▷ Class constants19100.00%
▷ Public constants19100.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
9 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/youtube-icon.png0.71KB0.89KB0.00%
resources/images/prev_next.png3.47KB0.69KB▼ 80.06%
resources/images/black_denim.png9.78KB10.98KB0.00%
resources/images/srzflickr-icon.png1.03KB0.83KB▼ 19.64%
resources/images/nav.png0.78KB0.46KB▼ 40.28%