84% featured-image

Code Review | Featured Image

WordPress plugin Featured Image scored84%from 54 tests.

About plugin

  • Plugin page: featured-image
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2012
  • Latest release: Sep 16, 2020
  • Number of updates: 6
  • Update frequency: every 517.2 days
  • Top authors: mervinpraison (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /63,721 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Featured Image
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.63 ▼0.46
Dashboard /wp-admin3.31 ▲0.0144.35 ▼3.67
Posts /wp-admin/edit.php3.36 ▲0.0146.45 ▼0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.39 ▲0.05
Media Library /wp-admin/upload.php3.23 ▲0.0135.19 ▼0.52

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Featured Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.131.86 ▼0.0243.59 ▲0.38
Dashboard /wp-admin2,209 ▲185.89 ▲1.05101.31 ▼9.7640.55 ▼6.59
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0034.24 ▼4.3733.09 ▼3.28
Add New Post /wp-admin/post-new.php1,547 ▲1118.36 ▼5.01599.01 ▼87.9178.07 ▲21.26
Media Library /wp-admin/upload.php1,385 ▼64.24 ▲0.1697.74 ▼12.1546.02 ▼2.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/featured-image/featured-image.php:54

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Featured Image area) image missing
You can look at the official readme.txt

featured-image/featured-image.php Passed 13 tests

The main PHP script in "Featured Image" version 2.1 is automatically included on every request by WordPress
112 characters long description:
Provides you with a featured image shortcode [ featured-img ] and Featured Image widget. Very Easy to implement.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin50 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1132050

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png91.91KB29.07KB▼ 68.37%