84% auto-smart-thumbnails

Code Review | Auto Smart Thumbnails

WordPress plugin Auto Smart Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: auto-smart-thumbn...
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 6.3.1
  • First release: Dec 30, 2019
  • Latest release: Mar 3, 2022
  • Number of updates: 24
  • Update frequency: every 34.2 days
  • Top authors: longchaoliu (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /3,589 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.82ms] Passed 4 tests

Server-side resources used by Auto Smart Thumbnails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.64 ▲5.09
Dashboard /wp-admin3.32 ▼0.0249.10 ▼8.91
Posts /wp-admin/edit.php3.44 ▲0.0845.53 ▼2.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.26 ▼18.27
Media Library /wp-admin/upload.php3.25 ▲0.0235.38 ▲2.00
Auto Smart Thumbnails /wp-admin/options-general.php?page=auto-smart-thumbnails3.2130.68
Auto Smart Thumbnails /wp-admin/tools.php?page=auto-smart-thumbnails3.2232.05

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

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

Browser metrics Passed 4 tests

Auto Smart Thumbnails: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.23 ▼1.141.83 ▼0.2643.74 ▼1.15
Dashboard /wp-admin2,214 ▲265.80 ▲0.8698.93 ▼12.8938.78 ▼5.29
Posts /wp-admin/edit.php2,097 ▲82.06 ▲0.0133.68 ▼3.0233.83 ▼1.09
Add New Post /wp-admin/post-new.php1,540 ▲2122.91 ▼0.06649.92 ▲36.5060.14 ▲10.31
Media Library /wp-admin/upload.php1,396 ▲84.23 ▲0.06109.62 ▲8.9547.35 ▲4.57
Auto Smart Thumbnails /wp-admin/options-general.php?page=auto-smart-thumbnails7732.0624.3525.00
Auto Smart Thumbnails /wp-admin/tools.php?page=auto-smart-thumbnails7902.1923.6627.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/auto-smart-thumbnails/inc/class-ast-resize-image.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-smart-thumbnails/inc/class-ast-remove-image-sizes.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-smart-thumbnails/auto-smart-thumbnails.php:34

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: "none"
You can take inspiration from this readme.txt

auto-smart-thumbnails/auto-smart-thumbnails.php Passed 13 tests

This is the main PHP file of "Auto Smart Thumbnails" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
98 characters long description:
Create thumbnails on demand with face detection. Remove unused thumbnails. Free up server storage.

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,137 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6324237957
JavaScript1437100
PO File2121272
CSS1108

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.17
▷ Minimum class complexity11.00
▷ Maximum class complexity41.00
Average method complexity5.13
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits2
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods410.53%
▷ Public methods2771.05%
▷ Protected methods410.53%
▷ Private methods718.42%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
There were not PNG files found in your plugin