74% thumbnail-create

Code Review | Thumbnail_Create

WordPress plugin Thumbnail_Create scored74%from 54 tests.

About plugin

  • Plugin page: thumbnail-create
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.1.1
  • WordPress version: 6.3.1
  • First release: May 30, 2017
  • Latest release: Apr 28, 2019
  • Number of updates: 31
  • Update frequency: every 22.6 days
  • Top authors: milkycocoa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,489 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.28MB] [CPU: ▼5.16ms] Passed 4 tests

An overview of server-side resources used by Thumbnail_Create
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3250.89 ▲11.30
Dashboard /wp-admin3.63 ▲0.2848.08 ▼11.39
Posts /wp-admin/edit.php3.68 ▲0.3250.06 ▲5.13
Add New Post /wp-admin/post-new.php6.15 ▲0.2690.54 ▼16.29
Media Library /wp-admin/upload.php3.49 ▲0.2635.67 ▲1.90
サムネ取得 /wp-admin/options-general.php?page=thumbnail_create_menu3.4635.60

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 600 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Thumbnail_Create: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.68 ▼1.061.68 ▼0.3537.76 ▼6.38
Dashboard /wp-admin2,210 ▲255.86 ▲0.00109.73 ▼5.5542.41 ▼1.56
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.1240.12 ▲2.1439.27 ▲3.21
Add New Post /wp-admin/post-new.php1,523 ▼1923.36 ▲5.35679.54 ▲1.9258.70 ▲3.84
Media Library /wp-admin/upload.php1,389 ▲44.15 ▼0.0596.11 ▼2.4544.42 ▼0.86
サムネ取得 /wp-admin/options-general.php?page=thumbnail_create_menu7852.0526.6655.46

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
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'newgeneratethum' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 328× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\BrowserKit\\Response' not found in wp-content/plugins/thumbnail-create/trunk/vendor/symfony/browser-kit/Tests/ClientTest.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/thumbnail-create/vendor/symfony/css-selector/Parser/Handler/CommentHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\ode\\AbstractNodeTest' not found in wp-content/plugins/thumbnail-create/trunk/vendor/symfony/css-selector/Tests/Node/ElementNodeTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/thumbnail-create/vendor/symfony/browser-kit/Tests/RequestTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/thumbnail-create/trunk/vendor/guzzlehttp/promises/src/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\DomCrawler\\Tests\\Field\\FormFieldTestCase' not found in wp-content/plugins/thumbnail-create/vendor/symfony/dom-crawler/Tests/Field/FormFieldTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\DomCrawler\\Link' not found in wp-content/plugins/thumbnail-create/vendor/symfony/dom-crawler/Form.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/thumbnail-create/trunk/vendor/guzzlehttp/promises/src/RejectedPromise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/thumbnail-create/vendor/guzzlehttp/psr7/tests/UriTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\ode\\AbstractNodeTest' not found in wp-content/plugins/thumbnail-create/vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Thumbnail_create)
You can look at the official readme.txt

thumbnail-create/thumbnail_create.php 92% from 13 tests

The primary PHP file in "Thumbnail_Create" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("thumbnail-create.php" instead of "thumbnail_create.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
Good job! No executable or dangerous file extensions detected28,801 lines of code in 277 files:
LanguageFilesBlank linesComment linesLines of code
PHP2344,5639,25324,283
Markdown1685403,035
JSON1100850
HTML300364
XML6100123
YAML421077
reStructuredText1433438
make211031

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.31
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces37
Interfaces38
Traits4
Classes404
▷ Abstract classes143.47%
▷ Concrete classes39096.53%
▷ Final classes102.56%
Methods3,876
▷ Static methods1945.01%
▷ Public methods3,50290.35%
▷ Protected methods1082.79%
▷ Private methods2666.86%
Functions812
▷ Named functions18222.41%
▷ Anonymous functions63077.59%
Constants108
▷ Global constants87.41%
▷ Class constants10092.59%
▷ Public constants100100.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
PNG images were not found in this plugin