84% navthemes-photo-shots-for-flickr

Code Review | NavThemes Photo Shots For Flickr

WordPress plugin NavThemes Photo Shots For Flickr scored84%from 54 tests.

About plugin

  • Plugin page: navthemes-photo-s...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Oct 8, 2015
  • Latest release: Nov 30, 2018
  • Number of updates: 8
  • Update frequency: every 143.8 days
  • Top authors: navthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /855 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼3.20ms] Passed 4 tests

Analyzing server-side resources used by NavThemes Photo Shots For Flickr
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.05 ▲3.09
Dashboard /wp-admin3.34 ▲0.0344.82 ▼2.95
Posts /wp-admin/edit.php3.39 ▲0.0348.29 ▼3.30
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.65 ▼6.42
Media Library /wp-admin/upload.php3.26 ▲0.0334.90 ▼0.13

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_widget_navthemes_photoshots_for_flickr
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for NavThemes Photo Shots For Flickr
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.74 ▲0.471.65 ▲0.1041.21 ▲0.98
Dashboard /wp-admin2,206 ▲155.85 ▲0.95106.58 ▲3.4138.74 ▼1.23
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0638.79 ▲1.9534.52 ▲0.58
Add New Post /wp-admin/post-new.php1,537 ▲2323.36 ▲5.83663.34 ▼36.5350.21 ▼6.40
Media Library /wp-admin/upload.php1,382 ▼34.22 ▲0.0094.97 ▼8.2541.67 ▼5.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_widget_navthemes_photoshots_for_flickr
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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 | 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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/navthemes-photo-shots-for-flickr/navthemes-photoshots-for-flickr.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
4 plugin tags: flickr, flickr widget, widget, flickr photos

navthemes-photo-shots-for-flickr/navthemes-photoshots-for-flickr.php 85% from 13 tests

The entry point to "NavThemes Photo Shots For Flickr" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("navthemes-photo-shots-for-flickr.php" instead of "navthemes-photoshots-for-flickr.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin114 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1474597
CSS13317

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ 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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.17MB with 0.12MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png177.02KB56.67KB▼ 67.98%