10% flickr-eyecandy

Code Review | FlickrEyeCandy

WordPress plugin FlickrEyeCandy scored10%from 54 tests.

About plugin

  • Plugin page: flickr-eyecandy
  • Plugin version: 2016.01.29
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.1
  • WordPress version: 6.3.1
  • First release: May 20, 2012
  • Latest release: Jan 29, 2016
  • Number of updates: 24
  • Update frequency: every 56.2 days
  • Top authors: dpchiesa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,976 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/flickr-eyecandy/flickr_eyecandy.php+157
    Methods with the same name as their class will not be constructors in a future version of PHP; FlickrEyeCandyWidget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼48.48ms] Passed 4 tests

This is a short check of server-side resources used by FlickrEyeCandy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.56 ▼33.04
Dashboard /wp-admin2.29 ▼1.0111.01 ▼39.15
Posts /wp-admin/edit.php2.30 ▼1.0610.69 ▼33.48
Add New Post /wp-admin/post-new.php2.29 ▼3.599.98 ▼88.26
Media Library /wp-admin/upload.php2.29 ▼0.948.69 ▼26.81

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_flickreyecandywidget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for FlickrEyeCandy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.451.80 ▲0.0940.75 ▼3.49
Dashboard /wp-admin2,195 ▲215.54 ▼0.1387.01 ▼10.3939.29 ▼2.98
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0339.88 ▼0.8435.53 ▼8.25
Add New Post /wp-admin/post-new.php1,526 ▼223.81 ▲0.88651.03 ▼2.4055.95 ▲1.70
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0298.71 ▼14.3640.33 ▼2.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in FlickrEyeCandyWidget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_flickreyecandywidget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/flickr-eyecandy/flickr_eyecandy.php:28

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This shows the rendering of the Widget in the sidebar of a WP blog.), #2 (This shows how to Activate the plugin in the Plugins menu in the WP Admin backend), #3 (Configuring the settings for the flickr_eyecandy widget in the WP Admin backend.)
The official readme.txt is a good inspiration

flickr-eyecandy/flickr_eyecandy.php 85% from 13 tests

The principal PHP file in "FlickrEyeCandy" v. 2016.01.29 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("flickr-eyecandy.php" instead of "flickr_eyecandy.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
Success! There were no dangerous files found in this plugin248 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14043248

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.00
▷ Minimum class complexity8.00
▷ Maximum class complexity14.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods333.33%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
3 PNG files occupy 0.23MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png45.37KB25.72KB▼ 43.31%
screenshot-3.png8.82KB7.28KB▼ 17.50%
screenshot-1.png181.74KB56.14KB▼ 69.11%