84% crop-thumbnails

Code Review | Crop-Thumbnails

WordPress plugin Crop-Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: crop-thumbnails
  • Plugin version: 1.7.2
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 15, 2012
  • Latest release: Jun 8, 2023
  • Number of updates: 106
  • Update frequency: every 36.4 days
  • Top authors: Volkmar Kantor (100%)

Code review

54 tests

User reviews

65 reviews

Install metrics

40,000+ active /550,568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼3.82ms] Passed 4 tests

This is a short check of server-side resources used by Crop-Thumbnails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2635.35 ▼2.84
Dashboard /wp-admin3.57 ▲0.2646.82 ▼1.83
Posts /wp-admin/edit.php3.68 ▲0.3249.27 ▲0.96
Add New Post /wp-admin/post-new.php6.18 ▲0.2988.57 ▼11.57
Media Library /wp-admin/upload.php3.49 ▲0.2636.08 ▲3.08
Crop-Thumbnails /wp-admin/options-general.php?page=page-cpt3.4531.86

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Crop-Thumbnails
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.331.49 ▼0.2038.70 ▼1.34
Dashboard /wp-admin2,210 ▲224.84 ▼0.00101.87 ▼14.7737.15 ▼5.14
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0333.94 ▼3.4534.11 ▲1.32
Add New Post /wp-admin/post-new.php1,539 ▲223.65 ▲5.28678.95 ▲33.1757.31 ▼0.12
Media Library /wp-admin/upload.php1,470 ▲825.49 ▲1.31114.79 ▲12.5346.23 ▲0.63
Crop-Thumbnails /wp-admin/options-general.php?page=page-cpt1,2203.6558.2832.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\add_action() in wp-content/plugins/crop-thumbnails/functions/rest.settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\add_filter() in wp-content/plugins/crop-thumbnails/functions/enqueuejsmodule.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\extend\\add_action() in wp-content/plugins/crop-thumbnails/functions/extend/WebPExpressExtension.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\add_action() in wp-content/plugins/crop-thumbnails/functions/save.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\add_filter() in wp-content/plugins/crop-thumbnails/functions/enqueuejsmodule.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\add_action() in wp-content/plugins/crop-thumbnails/functions/editor.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\add_action() in wp-content/plugins/crop-thumbnails/functions/settingsscreen.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function crop_thumbnails\\is_admin() in wp-content/plugins/crop-thumbnails/functions/backendpreparer.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: images, media library, post-thumbnails

crop-thumbnails/crop-thumbnails.php Passed 13 tests

This is the main PHP file of "Crop-Thumbnails" version 1.7.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
The easy way to adjust your cropped image sizes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,020 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92042861,019
CSS1001
JavaScript12420

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity18.25
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods56
▷ Static methods3358.93%
▷ Public methods3969.64%
▷ Protected methods1730.36%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin