10% wp-flickr-embed-plus

Code Review | Wordpress Flickr Embed Plus

WordPress plugin Wordpress Flickr Embed Plus scored10%from 54 tests.

About plugin

  • Plugin page: wp-flickr-embed-plus
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.2.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Sep 10, 2015
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: ded.zamkad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,472 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
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-flickr-embed-plus/wp-flickr-embed-plus.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; WpFlickrEmbed has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼53.58ms] Passed 4 tests

Analyzing server-side resources used by Wordpress Flickr Embed Plus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.59 ▼33.71
Dashboard /wp-admin2.16 ▼1.146.01 ▼45.73
Posts /wp-admin/edit.php2.16 ▼1.195.79 ▼41.61
Add New Post /wp-admin/post-new.php2.16 ▼3.726.44 ▼93.26
Media Library /wp-admin/upload.php2.16 ▼1.065.68 ▼26.77
WP Flickr Embed Plus /wp-admin/options-general.php?page=wp-flickr-embed-plus/include/pages/admin.php2.165.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
WpFlickrEmbed

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress Flickr Embed Plus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼1.251.68 ▼0.0640.55 ▲0.09
Dashboard /wp-admin2,213 ▲255.85 ▼0.0097.10 ▼12.6139.14 ▼5.61
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.1342.91 ▲0.9334.48 ▼1.61
Add New Post /wp-admin/post-new.php1,535 ▲1623.17 ▼0.01597.10 ▲1.5750.90 ▼0.07
Media Library /wp-admin/upload.php1,389 ▲14.24 ▲0.0794.69 ▼4.4142.48 ▼1.46
WP Flickr Embed Plus /wp-admin/options-general.php?page=wp-flickr-embed-plus/include/pages/admin.php1,0414.6850.9754.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-flickr-embed-plus/wp-flickr-embed-plus.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; WpFlickrEmbed has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • WpFlickrEmbed
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-embed-plus/include/pages/admin.php
    • > Deprecated in wp-content/plugins/wp-flickr-embed-plus/wp-flickr-embed-plus.php+34
    Methods with the same name as their class will not be constructors in a future version of PHP; WpFlickrEmbed has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-embed-plus/include/pages/admin.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-embed-plus/include/pages/admin.php
    • > Notice in wp-content/plugins/wp-flickr-embed-plus/wp-flickr-embed-plus.php+122
    Undefined property: WpFlickrEmbed::$_disabled
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-embed-plus/include/pages/admin.php
    • > Notice in wp-content/plugins/wp-flickr-embed-plus/include/class.admin-page.php+32
    Undefined index: auth_result
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-embed-plus/include/pages/admin.php
    • > Notice in wp-content/plugins/wp-flickr-embed-plus/include/class.admin-page.php+51
    Undefined index: action

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'WPFlickrEmbed_Constants' not found in wp-content/plugins/wp-flickr-embed-plus/include/class.admin-page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WpFlickrEmbed_Admin_Page' not found in wp-content/plugins/wp-flickr-embed-plus/include/pages/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-flickr-embed-plus/wp-flickr-embed-upload-frame.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-flickr-embed-plus/wp-flickr-embed-plus.php:56

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 on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (The Wordpress Flickr Embed Plus options page under the `Settings` menu), #2 (The Wordpress Flickr Embed Plus panel that appears on the post insertion screen), #3 (Example of photo on a blog with exif info)
  • Contributors: The plugin tags were not defined
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

wp-flickr-embed-plus/wp-flickr-embed-plus.php 92% from 13 tests

The principal PHP file in "Wordpress Flickr Embed Plus" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 168 characters long)

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
Good job! No executable or dangerous file extensions detected1,809 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6231326933
JavaScript2261216674
CSS2123202

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity20.75
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods56
▷ Static methods00.00%
▷ Public methods3867.86%
▷ Protected methods00.00%
▷ Private methods1832.14%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants35
▷ Global constants12.86%
▷ Class constants3497.14%
▷ Public constants34100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.82MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/size_thumbnail.png0.36KB0.13KB▼ 64.21%
images/alignment_none.png0.31KB0.10KB▼ 66.03%
images/size_square.png0.35KB0.12KB▼ 64.72%
images/size_medium.png0.35KB0.13KB▼ 62.82%
images/alignment_left.png0.33KB0.13KB▼ 61.01%