79% auto-featured-image-from-title

Code Review | Auto Featured Image from Title

WordPress plugin Auto Featured Image from Title scored 79% from 54 tests.

About plugin

  • Plugin page: auto-featured-ima...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2014
  • Latest release: Jun 13, 2023
  • Number of updates: 30
  • Update frequency: every 105.8 days
  • Top authors: brochris (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active / 37,780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.61ms] Passed 4 tests

An overview of server-side resources used by Auto Featured Image from Title
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.58 ▼4.89
Dashboard /wp-admin3.33 ▲0.0344.69 ▼1.11
Posts /wp-admin/edit.php3.38 ▲0.0347.48 ▲0.57
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.80 ▲9.16
Media Library /wp-admin/upload.php3.26 ▲0.0333.51 ▼1.01

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 23 new options
New WordPress options
can_compress_scripts
widget_recent-comments
auto_image_set_first
auto_image_text
auto_image_default_disable
auto_image_text_color
auto_image_bg_image
auto_image_pages
theysaidso_admin_options
auto_image_bg_color
...

Browser metrics Passed 4 tests

Auto Featured Image from Title: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲12813.88 ▼0.681.71 ▼0.1741.45 ▼12.31
Dashboard /wp-admin2,247 ▲594.99 ▲0.11115.82 ▲10.8338.96 ▼8.52
Posts /wp-admin/edit.php2,131 ▲422.32 ▲0.2740.70 ▲3.5636.30 ▲2.09
Add New Post /wp-admin/post-new.php6,484 ▲4,96520.17 ▼3.20874.90 ▲226.8735.73 ▼16.14
Media Library /wp-admin/upload.php1,429 ▲474.52 ▲0.2397.90 ▼0.2841.86 ▼0.07
Auto Featured Image /wp-admin/auto-featured-image-from-title.php260.440.0813.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 23 options in the database
    • auto_image_bg_image
    • auto_image_fontface
    • db_upgraded
    • widget_theysaidso_widget
    • auto_image_pages
    • auto_image_set_first
    • auto_image_fontsize
    • auto_image_width
    • auto_image_remove_linebreaks
    • auto_image_default_disable
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/auto-featured-image-from-title/auto-featured-image-from-title.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/auto-featured-image-from-title.php
    • > Network (severe)
    wp-admin/auto-featured-image-from-title.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: text picture, text pictures, automatically generate featured image, featured images, featured image...

auto-featured-image-from-title/auto-featured-image-from-title.php Passed 13 tests

The primary PHP file in "Auto Featured Image from Title" version 2.3 is used by WordPress to initiate all plugin functionality
86 characters long description:
Automatically generates an image from the post title and sets it as the featured image

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
Success! There were no dangerous files found in this plugin653 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP112975650
JavaScript1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/CaviarDreams.png0.75KB0.93KB0.00%
images/ChunkFive.png0.71KB0.86KB0.00%
images/Windsong.png0.89KB1.11KB0.00%