78% thumbnail-editor

Code Review | Thumbnail Editor

WordPress plugin Thumbnail Editor scored 78% from 54 tests.

About plugin

  • Plugin page: thumbnail-editor
  • Plugin version: 2.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Mar 23, 2023
  • Number of updates: 36
  • Update frequency: every 76.2 days
  • Top authors: avi.megladon (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 21,856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.15ms] Passed 4 tests

This is a short check of server-side resources used by Thumbnail Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1137.48 ▲1.17
Dashboard /wp-admin3.40 ▲0.1051.29 ▲4.22
Posts /wp-admin/edit.php3.51 ▲0.1651.06 ▲2.25
Add New Post /wp-admin/post-new.php6.00 ▲0.1287.43 ▼20.01
Media Library /wp-admin/upload.php3.32 ▲0.1036.77 ▲3.99
Thumbnail Editor /wp-admin/options-general.php?page=thumbnail_editor_setup_data3.2933.25

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_thumb_wid
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Thumbnail Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8913.31 ▼0.931.72 ▼0.0638.29 ▼8.21
Dashboard /wp-admin2,228 ▲365.05 ▲0.10113.99 ▼4.3642.76 ▼2.39
Posts /wp-admin/edit.php2,116 ▲272.29 ▲0.2538.42 ▲1.7334.99 ▲4.37
Add New Post /wp-admin/post-new.php1,536 ▲2223.21 ▲5.42648.31 ▼22.0936.51 ▼18.38
Media Library /wp-admin/upload.php1,413 ▲284.35 ▲0.0998.13 ▼4.4642.27 ▼1.37
Thumbnail Editor /wp-admin/options-general.php?page=thumbnail_editor_setup_data9961.9626.6528.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_thumb_wid
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/thumbnail-editor/view/admin/pro-add.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/thumbnail-editor/thumb-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/thumbnail-editor/view/admin/settings.php:5
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/thumbnail-editor/thumb-editor.php on line 24
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/thumbnail-editor/thumb-editor.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/thumbnail-editor/thumb-editor.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/thumbnail-editor/view/admin/donate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_intermediate_image_sizes() in wp-content/plugins/thumbnail-editor/view/admin/editor-settings.php:1
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/thumbnail-editor/thumb-editor.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/thumbnail-editor/view/admin/help.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

thumbnail-editor/thumb-editor.php 92% from 13 tests

The entry point to "Thumbnail Editor" version 2.3.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("thumbnail-editor.php" instead of "thumb-editor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,479 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41491641,531
CSS439741,354
PHP138524572
PO File110022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.17
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rss.png0.60KB0.50KB▼ 16.18%
images/crop.png0.41KB0.32KB▼ 21.48%
images/paypal.png0.77KB0.80KB0.00%
images/resize.png0.72KB0.69KB▼ 4.72%