10% wp-featured-image-widget

Code Review | WP Featured Image Widget

WordPress plugin WP Featured Image Widget scored 10% from 54 tests.

About plugin

  • Plugin page: wp-featured-image...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Jan 17, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: nanhe4it (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,034 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-featured-image-widget/index.php+202
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.11ms] Passed 4 tests

Server-side resources used by WP Featured Image Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.66 ▼34.52
Dashboard /wp-admin2.05 ▼1.265.85 ▼42.45
Posts /wp-admin/edit.php2.05 ▼1.317.29 ▼37.38
Add New Post /wp-admin/post-new.php2.05 ▼3.845.48 ▼86.09
Media Library /wp-admin/upload.php2.05 ▼1.185.25 ▼30.15

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_wpfeaturedimagewidget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP Featured Image Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.56 ▼0.745.06 ▲3.1738.58 ▼0.28
Dashboard /wp-admin2,209 ▲185.91 ▲0.05106.95 ▲2.5141.83 ▼1.33
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0139.65 ▲4.8535.75 ▲1.20
Add New Post /wp-admin/post-new.php1,533 ▲1323.49 ▲0.49633.28 ▲5.2364.11 ▲5.25
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0795.65 ▲0.5942.31 ▲0.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-featured-image-widget/index.php+202
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_wpfeaturedimagewidget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-featured-image-widget/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: widget, wordpress widget, post thumbnail, siderbar, featured image...

wp-featured-image-widget/index.php 92% from 13 tests

The main PHP script in "WP Featured Image Widget" version 0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-featured-image-widget.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin561 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2128211316
PHP1148181
CSS311564

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity10.60
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin