83% tz-flickr-widget

Code Review | TZ Flickr Widget

WordPress plugin TZ Flickr Widget scored83%from 54 tests.

About plugin

  • Plugin page: tz-flickr-widget
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: May 28, 2015
  • Latest release: Aug 24, 2015
  • Number of updates: 8
  • Update frequency: every 11.0 days
  • Top authors: tuyennv (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /20,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.52ms] Passed 4 tests

A check of server-side resources used by TZ Flickr Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.35 ▼3.22
Dashboard /wp-admin3.35 ▲0.0054.62 ▼13.07
Posts /wp-admin/edit.php3.40 ▲0.0448.88 ▼6.82
Add New Post /wp-admin/post-new.php5.93 ▲0.0499.55 ▼22.95
Media Library /wp-admin/upload.php3.27 ▲0.0440.01 ▲1.46

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 56 new files
Database: no new tables, 7 new options
New WordPress options
widget_tzflickr
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for TZ Flickr Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.011.67 ▼0.2743.52 ▲1.36
Dashboard /wp-admin2,192 ▲185.59 ▲0.0692.96 ▼9.6042.64 ▼0.08
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0636.46 ▼1.2035.74 ▲1.68
Add New Post /wp-admin/post-new.php1,526 ▼023.63 ▲0.51696.17 ▼6.5758.07 ▼4.59
Media Library /wp-admin/upload.php1,400 ▲34.24 ▲0.0598.81 ▼16.0150.44 ▲0.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_tzflickr
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tz-flickr-widget/widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (/trunk/screenshot-1.jpg), #2 (/trunk/screenshot-2.jpg), #3 (/trunk/screenshot-3.jpg)
You can take inspiration from this readme.txt

tz-flickr-widget/index.php 85% from 13 tests

This is the main PHP file of "TZ Flickr Widget" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tz-flickr-widget.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,050 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3183103695
CSS206210
PHP23875144
HTML1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
27 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/prettyPhoto/default/default_thumb.png1.50KB0.61KB▼ 59.47%
images/prettyPhoto/light_square/btnPrevious.png1.41KB1.19KB▼ 15.74%
images/prettyPhoto/light_rounded/btnNext.png1.38KB1.14KB▼ 17.29%
images/prettyPhoto/default/sprite_prev.png1.34KB0.38KB▼ 71.73%
images/prettyPhoto/light_rounded/sprite.png4.00KB2.56KB▼ 36.16%