84% flickr-photostream

Code Review | Flickr Photostream

WordPress plugin Flickr Photostream scored84%from 54 tests.

About plugin

  • Plugin page: flickr-photostream
  • Plugin version: 3.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2012
  • Latest release: Jan 4, 2015
  • Number of updates: 74
  • Update frequency: every 12.1 days
  • Top authors: miro.mannino (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

500+ active /88,861 total downloads

Benchmarks

Plugin footprint 83% 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.14MB] [CPU: ▼2.58ms] Passed 4 tests

An overview of server-side resources used by Flickr Photostream
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.72 ▼5.75
Dashboard /wp-admin3.44 ▲0.1464.61 ▲12.84
Posts /wp-admin/edit.php3.49 ▲0.1452.81 ▼0.61
Add New Post /wp-admin/post-new.php6.02 ▲0.1496.51 ▼9.56
Media Library /wp-admin/upload.php3.37 ▲0.1440.26 ▲5.59
Flickr Photostream /wp-admin/options-general.php?page=flickrps3.3337.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Flickr Photostream
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲16813.88 ▼0.317.72 ▲5.2839.94 ▼7.95
Dashboard /wp-admin2,219 ▲314.85 ▼1.06106.28 ▼3.7741.79 ▲2.84
Posts /wp-admin/edit.php2,105 ▲162.06 ▲0.0638.19 ▼2.4231.78 ▼3.04
Add New Post /wp-admin/post-new.php1,548 ▲1423.15 ▼0.11644.30 ▲4.1950.36 ▼8.96
Media Library /wp-admin/upload.php1,404 ▲164.28 ▼0.00111.42 ▼7.3052.51 ▲6.12
Flickr Photostream /wp-admin/options-general.php?page=flickrps1,4912.1528.4045.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/flickr-photostream/phpFlickr/example.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flickr-photostream/flickr-photostream-setting.php:34
    • > PHP Parse error
      syntax error, unexpected 'unset' (T_UNSET) in wp-content/plugins/flickr-photostream/phpFlickr/auth.php on line 17
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/flickr-photostream/phpFlickr/example.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/flickr-photostream/flickr-photostream.php:41

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (A tipical Photosream), #2 (A Photostream with more pages), #3 (The captions)
You can look at the official readme.txt

flickr-photostream/flickr-photostream.php Passed 13 tests

The principal PHP file in "Flickr Photostream" v. 3.1.8 is loaded by WordPress automatically on each request
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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin3,053 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP64254312,100
PO File2353692774
Markdown1530174
CSS2062
JavaScript2072
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity100.00
▷ Minimum class complexity13.00
▷ Maximum class complexity187.00
Average method complexity1.99
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods201
▷ Static methods00.00%
▷ Public methods201100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
swipebox/img/icons.png0.71KB0.43KB▼ 39.64%