10% generate-thumbnail

Code Review | Generate Thumbnail

WordPress plugin Generate Thumbnail scored10%from 54 tests.

About plugin

  • Plugin page: generate-thumbnail
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 9, 2018
  • Latest release: Feb 18, 2018
  • Number of updates: 3
  • Update frequency: every 3.3 days
  • Top authors: themeegg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,345 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
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/generate-thumbnail/admin/includes/getmbl-admin-filters-hooks.php+67
    Function create_function() is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼52.21ms] Passed 4 tests

Analyzing server-side resources used by Generate Thumbnail
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.46 ▼35.47
Dashboard /wp-admin2.16 ▼1.156.55 ▼52.96
Posts /wp-admin/edit.php2.16 ▼1.206.29 ▼38.92
Add New Post /wp-admin/post-new.php2.16 ▼3.737.70 ▼81.48
Media Library /wp-admin/upload.php2.16 ▼1.077.91 ▼30.74
Generate Thumbnails /wp-admin/tools.php?page=themeegg-generate-thumbnail2.166.92

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Generate Thumbnail
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15913.62 ▼0.768.88 ▲6.7042.37 ▼5.01
Dashboard /wp-admin2,214 ▲235.79 ▲0.80103.45 ▲0.1937.54 ▼5.46
Posts /wp-admin/edit.php2,079 ▼102.00 ▼0.0335.24 ▼2.6631.16 ▼5.20
Add New Post /wp-admin/post-new.php1,523 ▲223.18 ▼0.12612.11 ▼72.0961.85 ▲4.09
Media Library /wp-admin/upload.php1,399 ▲144.19 ▲0.0193.57 ▼17.1440.10 ▼7.42
Generate Thumbnails /wp-admin/tools.php?page=themeegg-generate-thumbnail8922.0723.9334.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/generate-thumbnail/admin/includes/getmbl-admin-filters-hooks.php+67
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/tools.php?page=themeegg-generate-thumbnail
    • > Deprecated in wp-content/plugins/generate-thumbnail/admin/includes/getmbl-admin-filters-hooks.php+67
    Function create_function() is deprecated

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
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/generate-thumbnail/admin/partials/generate-thumbnail-admin-display.php
    • > /wp-content/plugins/generate-thumbnail/public/partials/generate-thumbnail-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-thumbnail/admin/includes/getmbl-admin-filters-hooks.php:65

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: photo, admin, regenerate, image, ajax...

generate-thumbnail/generate-thumbnail.php Passed 13 tests

This is the main PHP file of "Generate Thumbnail" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
104 characters long description:
Generate Thumbnail allows you to generate all thumbnails at once without script timeouts on your server.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin461 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15185564455
JavaScript24546
CSS2080

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity1.88
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions6
▷ Named functions6100.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
There are no PNG files in this plugin