10% website-thumbshots

Code Review | Thumbshots plugin

WordPress plugin Thumbshots plugin scored 10% from 54 tests.

About plugin

  • Plugin page: website-thumbshots
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.5
  • WordPress version: 6.3.1
  • First release: May 6, 2012
  • Latest release: May 13, 2020
  • Number of updates: 16
  • Update frequency: every 183.8 days
  • Top authors: sam2kb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 3,441 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/website-thumbshots/inc/_common.funcs.php+170
    Undefined variable: chmod

Server metrics [RAM: ▼1.18MB] [CPU: ▼43.14ms] Passed 4 tests

This is a short check of server-side resources used by Thumbshots plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6813.32 ▼31.31
Dashboard /wp-admin2.83 ▼0.4715.68 ▼32.67
Posts /wp-admin/edit.php2.83 ▼0.5217.37 ▼29.08
Add New Post /wp-admin/post-new.php2.83 ▼3.0514.48 ▼79.49
Media Library /wp-admin/upload.php2.83 ▼0.4015.96 ▼14.52

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

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/website-thumbshots/" and "wp-content/uploads/"
    • (new file) wp-content/thumbs_cache/index.html
Filesystem: 14 new files
Database: no new tables, 28 new options
New WordPress options
widget_theysaidso_widget
thumb_debug
thumb_link_to_exit_page
thumb_original_image_w
thumb_allow_reloads
thumb_queued_cache_days
thumb_service_images_enabled
thumb_preview_height
thumb_access_key
thumb_height
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Thumbshots plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲19814.10 ▼0.526.34 ▲4.3837.73 ▼9.36
Dashboard /wp-admin2,228 ▲404.95 ▼0.9498.26 ▼19.6185.06 ▲39.25
Posts /wp-admin/edit.php2,114 ▲252.00 ▼0.0537.61 ▼1.7933.19 ▲0.65
Add New Post /wp-admin/post-new.php1,684 ▲16422.26 ▼0.90646.27 ▲9.2142.67 ▼13.54
Media Library /wp-admin/upload.php1,407 ▲164.13 ▼0.0898.43 ▲4.2179.69 ▲36.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/website-thumbshots/inc/_plugin-helper.class.php+91
    unserialize(): Error at offset 0 of 1 bytes
  • Zombie WordPress options detected upon uninstall: 28 options
    • thumb_debug_ip
    • theysaidso_admin_options
    • thumb_link
    • thumb_queued_cache_days
    • thumb_debug
    • thumb_link_noindex
    • thumb_link_nofollow
    • db_upgraded
    • widget_recent-comments
    • thumb_service_images_enabled
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/website-thumbshots/inc/_thumbshots.class.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function content_url() in wp-content/plugins/website-thumbshots/thumbshots.plugin.php:59
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/website-thumbshots/thumbshots.plugin.php on line 58

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (The plugin interface), #2 (Post editor button and inserted shortcode), #3 (An example thumbshot with reload button, and an optional mouseover header preview)
The official readme.txt is a good inspiration

website-thumbshots/thumbshots.plugin.php 92% from 13 tests

The main PHP script in "Thumbshots plugin" version 1.4.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("website-thumbshots.php" instead of "thumbshots.plugin.php")

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
Success! There were no dangerous files found in this plugin1,981 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44102231,916
JavaScript181759
CSS12126

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity100.33
▷ Minimum class complexity68.00
▷ Maximum class complexity164.00
Average method complexity6.73
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
menu-icon.png1.65KB0.74KB▼ 55.19%
plugin-logo.png19.28KB10.03KB▼ 47.95%