57% flickr-shortcode-importer

Code Review | Flickr Shortcode Importer

WordPress plugin Flickr Shortcode Importer scored 57% from 54 tests.

About plugin

  • Plugin page: flickr-shortcode-...
  • Plugin version: 2.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.7.2
  • WordPress version: 5.8.1
  • First release: Aug 11, 2011
  • Latest release: Feb 7, 2017
  • Number of updates: 218
  • Update frequency: every 9.2 days
  • Top authors: comprock (99.08%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 25,029 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.32MB] [CPU: ▼683.36ms] Passed 4 tests

Analyzing server-side resources used by Flickr Shortcode Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.35 ▲0.6345.71 ▲25.87
Dashboard /wp-admin2.33 ▼0.7211.65 ▼32.68
Posts /wp-admin/edit.php2.33 ▼0.779.99 ▼34.36
Add New Post /wp-admin/post-new.php2.33 ▼3.1011.85 ▼2,645.23
Media Library /wp-admin/upload.php2.33 ▼0.679.79 ▼21.18
Flickr Shortcode Importer /wp-admin/options-general.php?page=flickr-shortcode-importer-settings2.339.45
[flickr] Importer /wp-admin/tools.php?page=flickr-shortcode-importer2.3311.83

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 160 new files
Database: no new tables, 1 new option
New WordPress options
flickr-shortcode-importer-settings

Browser metrics Passed 4 tests

An overview of browser requirements for Flickr Shortcode Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11616.21 ▲0.628.59 ▼0.0467.15 ▲16.39
Dashboard /wp-admin2,980 ▲435.93 ▼0.26151.30 ▲0.97122.03 ▲17.24
Posts /wp-admin/edit.php2,746 ▲72.69 ▲0.0071.35 ▲4.9395.21 ▲8.47
Add New Post /wp-admin/post-new.php1,914 ▲24218.87 ▲0.01379.87 ▲12.74116.92 ▲2.55
Media Library /wp-admin/upload.php1,817 ▲105.03 ▲0.03140.40 ▼3.38115.18 ▼0.26
Flickr Shortcode Importer /wp-admin/options-general.php?page=flickr-shortcode-importer-settings1,8562.8067.87113.35
[flickr] Importer /wp-admin/tools.php?page=flickr-shortcode-importer1,1012.3454.1064.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/flickr-shortcode-importer/includes/libraries/screen-meta-links.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; wsScreenMetaLinks11 has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 1 option
    • flickr-shortcode-importer-settings

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=flickr-shortcode-importer
    • > Deprecated in wp-content/plugins/flickr-shortcode-importer/includes/libraries/screen-meta-links.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; wsScreenMetaLinks11 has a deprecated constructor

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/flickr-shortcode-importer/includes/libraries/aihrus-framework/includes/libraries/class-redrokk-metabox-class.php
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type bool in wp-content/plugins/flickr-shortcode-importer/includes/libraries/phpflickr/example.php on line 21
    • > PHP Warning
      require_once(AIHR_DIR_INCclass-aihrus-settings.php): failed to open stream: No such file or directory in wp-content/plugins/flickr-shortcode-importer/includes/class-flickr-shortcode-importer-settings.php on line 25
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flickr-shortcode-importer/includes/libraries/aihrus-framework/includes/class-aihrus-settings.php on line 24
    • > PHP Warning
      require_once(FSI_DIR_LIBaihrus-framework/aihrus-framework.php): failed to open stream: No such file or directory in wp-content/plugins/flickr-shortcode-importer/includes/requirements.php on line 19
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/flickr-shortcode-importer/includes/libraries/phpflickr/example.php on line 21
    • > PHP Fatal error
      require_once(): Failed opening required 'AIHR_DIR_INCclass-aihrus-common.php' (include_path='.:/usr/share/php') in wp-content/plugins/flickr-shortcode-importer/includes/class-flickr-shortcode-importer.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'AIHR_DIR_INCclass-aihrus-settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/flickr-shortcode-importer/includes/class-flickr-shortcode-importer-settings.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/flickr-shortcode-importer/includes/libraries/aihrus-framework/aihrus-framework.php:26
    • > PHP Warning
      require_once(AIHR_DIR_INCclass-aihrus-common.php): failed to open stream: No such file or directory in wp-content/plugins/flickr-shortcode-importer/includes/class-flickr-shortcode-importer.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'FSI_DIR_LIBaihrus-framework/aihrus-framework.php' (include_path='.:/usr/share/php') in wp-content/plugins/flickr-shortcode-importer/includes/requirements.php on line 19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=flickr-shortcode-importer-settings
    • > Network (severe)
    https://www.axelerant.com/wp-content/uploads/2015/02/IGP7228-2015-01-22-at-05-18-02.jpg - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: featured image, photo, video, flickr, import...

flickr-shortcode-importer/flickr-shortcode-importer.php 92% from 13 tests

The main PHP script in "Flickr Shortcode Importer" version 2.2.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 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 detected8,983 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP221,9811,4186,954
Markdown5935201,066
CSS22034450
HTML5043386
JavaScript1272098
JSON10021
XML1008

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity63.75
▷ Minimum class complexity1.00
▷ Maximum class complexity187.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes13
▷ Abstract classes430.77%
▷ Concrete classes969.23%
▷ Final classes00.00%
Methods438
▷ Static methods9621.92%
▷ Public methods39991.10%
▷ Protected methods398.90%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants35
▷ Global constants2777.14%
▷ Class constants822.86%
▷ Public constants8100.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
15 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/redmond/images/ui-icons_d8e7f3_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png5.69KB2.08KB▼ 63.46%
assets/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png0.33KB0.16KB▼ 52.38%
assets/css/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png0.33KB0.13KB▼ 60.36%
assets/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%