10% cc-flickr-widget

Code Review | CC Flickr Widget

WordPress plugin CC Flickr Widget scored10%from 54 tests.

About plugin

  • Plugin page: cc-flickr-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: May 6, 2014
  • Latest release: May 21, 2014
  • Number of updates: 16
  • Update frequency: every 0.9 days
  • Top authors: thecrazycoder (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

50+ active /3,486 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
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/cc-flickr-widget/cc-flickr-widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; CC_Flickr_Widget has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼58.51ms] Passed 4 tests

A check of server-side resources used by CC Flickr Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.05 ▼37.97
Dashboard /wp-admin2.09 ▼1.255.67 ▼58.05
Posts /wp-admin/edit.php2.09 ▼1.266.82 ▼45.16
Add New Post /wp-admin/post-new.php2.09 ▼3.796.31 ▼92.84
Media Library /wp-admin/upload.php2.09 ▼1.145.30 ▼34.06

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/cc-flickr-widget/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_flickr-widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by CC Flickr Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.21 ▼1.101.71 ▼0.0238.76 ▼0.98
Dashboard /wp-admin2,224 ▲275.91 ▲1.0498.58 ▼11.8639.61 ▼1.87
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0236.01 ▼3.3234.29 ▼4.73
Add New Post /wp-admin/post-new.php1,554 ▲2318.34 ▼4.83625.85 ▼35.4250.91 ▼4.95
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.0095.65 ▼9.2941.65 ▼6.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/cc-flickr-widget/cc-flickr-widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; CC_Flickr_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_flickr-widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just 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/cc-flickr-widget/cc-flickr-widget.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: photos, widget, flickr

cc-flickr-widget/cc-flickr-widget.php 92% from 13 tests

The entry point to "CC Flickr Widget" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 218 characters long)

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
Success! There were no dangerous files found in this plugin87 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1281487

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin