84% featured-image-generator

Code Review | Featured Image Generator

WordPress plugin Featured Image Generator scored84%from 54 tests.

About plugin

  • Plugin page: featured-image-ge...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Jul 22, 2023
  • Number of updates: 53
  • Update frequency: every 48.1 days
  • Top authors: aumkub (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /57,273 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.13MB] [CPU: ▼3.74ms] Passed 4 tests

Analyzing server-side resources used by Featured Image Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1138.69 ▲2.56
Dashboard /wp-admin3.50 ▲0.1648.52 ▼11.52
Posts /wp-admin/edit.php3.56 ▲0.2054.57 ▲6.94
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.74 ▼3.67
Media Library /wp-admin/upload.php3.35 ▲0.1233.37 ▼2.32
Featured Image Generator /wp-admin/options-general.php?page=featured-image-generator-setting-page3.3535.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 10 new options
New WordPress options
fig_thumb_defaut_size_height
can_compress_scripts
widget_recent-comments
fig_font_family
db_upgraded
theysaidso_admin_options
fig_thumb_defaut_size_width
fig_unsplash_api
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Featured Image Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲15114.65 ▲0.371.77 ▼0.0541.76 ▼1.39
Dashboard /wp-admin2,340 ▲1636.13 ▲0.57106.33 ▲19.4540.92 ▼6.44
Posts /wp-admin/edit.php2,274 ▲1713.30 ▲1.3154.52 ▲20.3635.54 ▲2.87
Add New Post /wp-admin/post-new.php6,239 ▲4,70326.01 ▲7.72819.24 ▲185.3836.43 ▼34.45
Media Library /wp-admin/upload.php1,408 ▲84.18 ▼0.2082.92 ▼29.4241.82 ▼5.90
Featured Image Generator /wp-admin/options-general.php?page=featured-image-generator-setting-page1,1872.8938.4429.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/featured-image-generator/public/partials/featured-image-generator-public-display.php
    • > /wp-content/plugins/featured-image-generator/admin/partials/featured-image-generator-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 29 tag instead of maximum 10
Please take inspiration from this readme.txt

featured-image-generator/featured-image-generator.php 92% from 13 tests

Analyzing the main PHP file in "Featured Image Generator" version 1.3.1
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,622 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12206544608
CSS211812602
JavaScript214031412

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.57
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods1947.50%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected