10% wp-flickr-press

Code Review | wp-flickr-press

WordPress plugin wp-flickr-press scored10%from 54 tests.

About plugin

  • Plugin page: wp-flickr-press
  • Plugin version: 2.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Nov 17, 2010
  • Latest release: Mar 7, 2018
  • Number of updates: 248
  • Update frequency: every 10.8 days
  • Top authors: tatsuya (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /45,205 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wp-flickr-press/libs/PHPFlickr-Oauth/phpFlickr.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr has a deprecated constructor

Server metrics [RAM: ▼1.14MB] [CPU: ▼56.41ms] Passed 4 tests

A check of server-side resources used by wp-flickr-press
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.617.01 ▼34.40
Dashboard /wp-admin2.87 ▼0.438.04 ▼46.69
Posts /wp-admin/edit.php2.87 ▼0.497.56 ▼45.04
Add New Post /wp-admin/post-new.php2.87 ▼3.0210.53 ▼99.51
Media Library /wp-admin/upload.php2.87 ▼0.367.46 ▼32.19
FlickrPress /wp-admin/options-general.php?page=wp-flickr-press/FpAdminSettingEvent.php2.877.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for wp-flickr-press
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲6014.91 ▲0.601.94 ▼0.0744.90 ▼0.35
Dashboard /wp-admin2,252 ▲756.41 ▲0.72124.44 ▲33.6240.41 ▼2.69
Posts /wp-admin/edit.php2,178 ▲753.44 ▲1.3947.76 ▲7.4831.28 ▼5.23
Add New Post /wp-admin/post-new.php1,711 ▲18522.23 ▲4.71586.15 ▼47.1628.59 ▼32.38
Media Library /wp-admin/upload.php1,418 ▲154.50 ▲0.3188.02 ▼19.0442.72 ▼8.68
FlickrPress /wp-admin/options-general.php?page=wp-flickr-press/FpAdminSettingEvent.php1,7263.2543.7070.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-flickr-press/libs/PHPFlickr-Oauth/phpFlickr.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr has a deprecated constructor
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-press/FpAdminSettingEvent.php
    • > Deprecated in wp-content/plugins/wp-flickr-press/libs/PHPFlickr-Oauth/phpFlickr.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-press/FpAdminSettingEvent.php
    • > Deprecated in wp-content/plugins/wp-flickr-press/libs/PHPFlickr-Oauth/phpFlickr.php+1633
    Methods with the same name as their class will not be constructors in a future version of PHP; phpFlickr_pager has a deprecated constructor

SRP 0% 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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-flickr-press/media-upload_search.php
    • > /wp-content/plugins/wp-flickr-press/inc.flickr_oauth_callback.php
    • > /wp-content/plugins/wp-flickr-press/media-upload_search_thumbnail.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-flickr-press/check-setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-flickr-press/check-oauth.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-flickr-press/media-send-editor.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-flickr-press/check-oauth.php:2
    • > PHP Notice
      Undefined variable: token in wp-content/plugins/wp-flickr-press/inc.flickr_oauth_callback.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-flickr-press/check-setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-flickr-press/check-oauth.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-flickr-press/inc.header_tab.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-flickr-press/FlickrPress.php:340

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-press/FpAdminSettingEvent.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=wp-flickr-press%2FFpAdminSettingEvent.php:214:60)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wp-flickr-press/FpAdminSettingEvent.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Search), #2 (Insert Post), #3 (Setting config), #4 (FullScreen Writing), #5 (New UI 1), #6 (New UI 2)
Please take inspiration from this readme.txt

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

This is the main PHP file of "wp-flickr-press" version 2.6.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
40 characters long description:
Flickr integration for wordpress plugin.

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
There were no executable files found in this plugin5,927 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP184823383,097
JavaScript102382492,031
PO File2182157399
CSS6494357
Ruby16532
Markdown1206
Bourne Shell1105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity32.25
▷ Minimum class complexity3.00
▷ Maximum class complexity162.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods280
▷ Static methods7125.36%
▷ Public methods27397.50%
▷ Protected methods00.00%
▷ Private methods72.50%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
7 PNG files occupy 2.06MB with 1.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png134.72KB41.92KB▼ 68.89%
images/icon-flickr_32.png56.74KB0.88KB▼ 98.45%
screenshot-4.png20.78KB7.91KB▼ 61.94%
screenshot-2.png86.41KB31.40KB▼ 63.66%
screenshot-5.png115.75KB36.82KB▼ 68.19%