79% wen-featured-image

Code Review | WEN Featured Image

WordPress plugin WEN Featured Image scored79%from 54 tests.

About plugin

  • Plugin page: wen-featured-image
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 27, 2015
  • Latest release: Aug 24, 2022
  • Number of updates: 22
  • Update frequency: every 123.1 days
  • Top authors: wenthemes (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

5,000+ active /47,465 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.52ms] Passed 4 tests

An overview of server-side resources used by WEN Featured Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1746.15 ▲0.48
Dashboard /wp-admin3.48 ▲0.1450.54 ▼12.52
Posts /wp-admin/edit.php3.63 ▲0.2759.11 ▲8.07
Add New Post /wp-admin/post-new.php6.06 ▲0.1886.53 ▼17.03
Media Library /wp-admin/upload.php3.41 ▲0.1839.04 ▲6.98
WEN Featured Image /wp-admin/options-general.php?page=wen-featured-image3.3736.56

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WEN Featured Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.19 ▼1.111.79 ▼0.1938.09 ▼4.51
Dashboard /wp-admin2,228 ▲254.87 ▼0.0698.66 ▼22.4438.60 ▼4.74
Posts /wp-admin/edit.php2,315 ▲2183.56 ▲1.5666.66 ▲31.9369.93 ▲34.33
Add New Post /wp-admin/post-new.php1,548 ▲823.43 ▲5.16673.46 ▲12.8850.68 ▼3.25
Media Library /wp-admin/upload.php1,401 ▲44.15 ▼0.1180.82 ▼28.7441.86 ▼2.76
WEN Featured Image /wp-admin/options-general.php?page=wen-featured-image1,1382.0325.1529.84

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wen-featured-image/admin/partials/wen-featured-image-admin-right-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wen-featured-image/admin/partials/wen-featured-image-admin-display.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: images, admin, upload, featured image, media...

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

The primary PHP file in "WEN Featured Image" version 1.5.2 is used by WordPress to initiate all plugin functionality
109 characters long description:
Add featured image column in listings. You can easily add/change/remove featured image from the listing page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected881 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11310632687
JavaScript22813105
PO File1304566
CSS21423

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.83
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods54
▷ Static methods23.70%
▷ Public methods4685.19%
▷ Protected methods23.70%
▷ Private methods611.11%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/no-image.png0.28KB0.28KB▼ 0.70%