83% letterbox-thumnails

Code Review | Letterbox Thumbnails

WordPress plugin Letterbox Thumbnails scored83%from 54 tests.

About plugin

  • Plugin page: letterbox-thumnails
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2013
  • Latest release: May 22, 2019
  • Number of updates: 22
  • Update frequency: every 97.1 days
  • Top authors: dark_diesel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.45ms] Passed 4 tests

This is a short check of server-side resources used by Letterbox Thumbnails
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.47 ▲2.22
Dashboard /wp-admin3.37 ▲0.0349.97 ▼15.64
Posts /wp-admin/edit.php3.49 ▲0.1353.14 ▲1.20
Add New Post /wp-admin/post-new.php5.97 ▲0.0988.90 ▼17.58
Media Library /wp-admin/upload.php3.31 ▲0.0943.60 ▲8.28
Letterbox Thumbnails /wp-admin/options-general.php?page=letterbox-thumbnails-settings3.2935.98

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by Letterbox Thumbnails
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.68 ▼0.654.95 ▲2.9043.73 ▼2.83
Dashboard /wp-admin2,213 ▲255.91 ▲0.03107.24 ▲4.2237.80 ▼9.65
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0340.54 ▲5.1737.85 ▲2.71
Add New Post /wp-admin/post-new.php1,517 ▼1617.54 ▼5.49689.13 ▲53.8464.04 ▼3.57
Media Library /wp-admin/upload.php1,389 ▼24.32 ▲0.1699.36 ▼5.4143.96 ▼0.02
Letterbox Thumbnails /wp-admin/options-general.php?page=letterbox-thumbnails-settings8952.0745.6624.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=letterbox-thumbnails-settings
    • > Error in wp-content/plugins/letterbox-thumnails/templates/admin/settings.php+56
    Uncaught Error: Call to undefined function IPA_Fields_Pack() in wp-content/plugins/letterbox-thumnails/templates/admin/settings.php:56
    Stack trace:
    #0 wp-content/plugins/letterbox-thumnails/includes/class-letterbox-thumbnails-functions.php(43): include()
    #1 wp-content/plugins/letterbox-thumnails/includes/admin/class-letterbox-thumbnails-admin-menus-settings.php(26): LetterboxThumbnails_Functions->get_template()
    #2 wp-content/plugins/letterbox-thumnails/includes/admin/class-letterbox-thumbnails-admin-menus.php(44): LetterboxThumbnails_Admin_Menus_Settings::output()
    #3 wp-includes/class-wp-hook.php(310): LetterboxThumbnails_Admin_Menus->letterbox_thumbnails_settings_page()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 wp-admin/opti

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

letterbox-thumnails/letterbox-thumbnails.php 77% from 13 tests

Analyzing the main PHP file in "Letterbox Thumbnails" version 2.0.1
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("letterbox-thumnails.php" instead of "letterbox-thumbnails.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.5.0" instead of "4.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin584 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12149292494
JavaScript116167
Sass11014
CSS1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.80
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods32
▷ Static methods825.00%
▷ Public methods2784.38%
▷ Protected methods13.12%
▷ Private methods412.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin