74% simple-flickr-display

Code Review | Simple Flickr Display

WordPress plugin Simple Flickr Display scored 74% from 54 tests.

About plugin

  • Plugin page: simple-flickr-dis...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.8.0
  • WordPress version: 5.8.1
  • First release: May 11, 2013
  • Latest release: Jul 11, 2021
  • Number of updates: 17
  • Update frequency: every 175.5 days
  • Top authors: wolfpaw (64.71%)davidjlaietta (41.18%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,318 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼145.43ms] Passed 4 tests

This is a short check of server-side resources used by Simple Flickr Display
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1536.14 ▲10.05
Dashboard /wp-admin3.10 ▲0.0454.05 ▲3.53
Posts /wp-admin/edit.php3.15 ▲0.0447.27 ▼9.29
Add New Post /wp-admin/post-new.php5.45 ▲0.02104.13 ▼578.76
Media Library /wp-admin/upload.php3.04 ▲0.0440.38 ▲2.79

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_simple-flickr-display

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Flickr Display
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.47 ▼0.2015.73 ▲5.0750.37 ▲0.22
Dashboard /wp-admin2,967 ▲335.95 ▼0.13177.24 ▼10.83128.50 ▲12.68
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0075.90 ▼3.3097.48 ▲5.58
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▲0.30431.95 ▼18.62112.89 ▼2.49
Media Library /wp-admin/upload.php1,807 ▼05.04 ▼0.00160.52 ▼10.79126.88 ▲2.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Simple_Flickr_Display' does not have a method 'deactivate'
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_simple-flickr-display

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

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-flickr-display/simple-flickr-display.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: flickr, images

simple-flickr-display/simple-flickr-display.php 92% from 13 tests

"Simple Flickr Display" version 1.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin159 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14663114
CSS15145

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin