10% flickr-media-scanner

Code Review | Flickr Media Scanner

WordPress plugin Flickr Media Scanner scored10%from 54 tests.

About plugin

  • Plugin page: flickr-media-scanner
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Nov 6, 2014
  • Latest release: Jul 20, 2015
  • Number of updates: 8
  • Update frequency: every 32.1 days
  • Top authors: alancf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /707 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/flickr-media-scanner/includes/class_scanner.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; FMS_Scanner has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼50.23ms] Passed 4 tests

Analyzing server-side resources used by Flickr Media Scanner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.70 ▼40.87
Dashboard /wp-admin2.09 ▼1.216.28 ▼39.57
Posts /wp-admin/edit.php2.09 ▼1.276.11 ▼37.73
Add New Post /wp-admin/post-new.php2.09 ▼3.805.63 ▼82.73
Media Library /wp-admin/upload.php2.09 ▼1.146.32 ▼28.92
Flickr Media Scanner /wp-admin/options-general.php?page=flickr_media_scanner2.095.83

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Flickr Media Scanner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.61 ▼0.751.73 ▼0.4141.12 ▼3.71
Dashboard /wp-admin2,211 ▲235.82 ▲0.9096.30 ▼12.5641.13 ▼0.92
Posts /wp-admin/edit.php2,097 ▲82.01 ▲0.0237.81 ▲0.5134.44 ▲1.72
Add New Post /wp-admin/post-new.php1,521 ▼2117.51 ▼0.69670.94 ▲39.4952.05 ▼5.70
Media Library /wp-admin/upload.php1,396 ▲84.19 ▼0.0697.15 ▼5.4941.43 ▼3.82
Flickr Media Scanner /wp-admin/options-general.php?page=flickr_media_scanner8332.0724.7226.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/flickr-media-scanner/includes/class_scanner.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; FMS_Scanner has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=flickr_media_scanner
    • > Deprecated in wp-content/plugins/flickr-media-scanner/includes/class_scanner.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; FMS_Scanner has a deprecated constructor

SRP 50% 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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flickr-media-scanner/flickr-media-scanner.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
3 plugin tags: photos, flickr, images

flickr-media-scanner/flickr-media-scanner.php Passed 13 tests

Analyzing the main PHP file in "Flickr Media Scanner" version 1.0.4
60 characters long description:
Finds all Flickr photos used in posts that have been removed

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected215 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2498148
JavaScript16037
CSS16030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png152.78KB50.03KB▼ 67.25%