83% wp-auto-thumbnails

Code Review | Auto Attach Thumbnails

WordPress plugin Auto Attach Thumbnails scored83%from 54 tests.

About plugin

  • Plugin page: wp-auto-thumbnails
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2016
  • Latest release: Nov 7, 2016
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: ilonapetrak (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,290 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.02MB] [CPU: ▼3.47ms] Passed 4 tests

A check of server-side resources used by Auto Attach Thumbnails
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.28 ▼4.54
Dashboard /wp-admin3.32 ▲0.0243.79 ▼4.78
Posts /wp-admin/edit.php3.37 ▲0.0247.35 ▼5.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.02 ▲4.46
Media Library /wp-admin/upload.php3.24 ▲0.0231.53 ▲0.48

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Auto Attach Thumbnails
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲4913.12 ▼1.321.65 ▼0.3043.22 ▲3.39
Dashboard /wp-admin2,223 ▲384.86 ▼0.03109.25 ▲2.7842.34 ▼1.30
Posts /wp-admin/edit.php2,109 ▲202.01 ▼0.0239.93 ▼4.7635.00 ▼5.56
Add New Post /wp-admin/post-new.php1,546 ▲918.23 ▼0.25672.57 ▲14.2754.56 ▲4.17
Media Library /wp-admin/upload.php1,405 ▲144.21 ▼0.06101.40 ▼0.9244.22 ▼2.55

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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/wp-auto-thumbnails/auto-attach-thumbnails.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Choose posts)
Please take inspiration from this readme.txt

wp-auto-thumbnails/auto-attach-thumbnails.php 77% from 13 tests

The main PHP script in "Auto Attach Thumbnails" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-auto-thumbnails.php" instead of "auto-attach-thumbnails.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin139 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11429110
CSS11021
JavaScript1038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.06KB16.89KB▼ 39.81%