10% post-feature-widget

Code Review | Featured Post Widget

WordPress plugin Featured Post Widget scored10%from 54 tests.

About plugin

  • Plugin page: post-feature-widget
  • Plugin version: 4.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.5
  • WordPress version: 6.3.1
  • First release: Jan 10, 2011
  • Latest release: Feb 28, 2016
  • Number of updates: 66
  • Update frequency: every 28.4 days
  • Top authors: tepelstreel (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active /64,869 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/post-feature-widget/class-lib/FP_WidgetClass.php+406
    Function create_function() is deprecated

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

A check of server-side resources used by Featured Post Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.70 ▼34.33
Dashboard /wp-admin2.05 ▼1.266.91 ▼40.36
Posts /wp-admin/edit.php2.05 ▼1.317.10 ▼39.13
Add New Post /wp-admin/post-new.php2.05 ▼3.846.29 ▼92.07
Media Library /wp-admin/upload.php2.05 ▼1.184.77 ▼36.25
Featured Post Widget /wp-admin/options-general.php?page=featured-post-settings2.055.72

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
pf_options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_featured_post_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Post Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.31 ▼1.071.65 ▼0.1145.02 ▲0.54
Dashboard /wp-admin2,222 ▲375.86 ▼0.02102.32 ▼1.3771.02 ▲29.10
Posts /wp-admin/edit.php2,114 ▲251.98 ▼0.0235.75 ▼4.8332.31 ▼6.39
Add New Post /wp-admin/post-new.php1,538 ▼422.98 ▲4.94753.80 ▲107.8668.44 ▲16.09
Media Library /wp-admin/upload.php1,410 ▲224.23 ▲0.0493.98 ▼4.0264.27 ▲22.65
Featured Post Widget /wp-admin/options-general.php?page=featured-post-settings1,0464.7151.1949.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/post-feature-widget/class-lib/FP_WidgetClass.php+406
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_featured_post_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=featured-post-settings
    • > Deprecated in wp-content/plugins/post-feature-widget/class-lib/FP_WidgetClass.php+406
    Function create_function() is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'A5_OptionPage' not found in wp-content/plugins/post-feature-widget/class-lib/FP_AdminClass.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/post-feature-widget/class-lib/A5_WidgetClass.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'A5_Widget' not found in wp-content/plugins/post-feature-widget/class-lib/FP_WidgetClass.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'A5_DynamicFiles' not found in wp-content/plugins/post-feature-widget/class-lib/FP_DynamicCSSClass.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=featured-post-settings
    • > Network (severe)
    wp-content/plugins/category-coloumn/img/a5-icon-34.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=featured-post-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/post-feature-widget/ta-expander.min.js?ver=3.0:1:2865)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=featured-post-settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: image, widget, newspaper, sidebar, featured...

post-feature-widget/postfeature.php 77% from 13 tests

The primary PHP file in "Featured Post Widget" version 4.2.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("post-feature-widget.php" instead of "postfeature.php")
  • Description: The description should be shorter than 140 characters (currently 277 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin2,114 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP101,3445171,682
PO File18184271
JavaScript26516161

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity28.70
▷ Minimum class complexity9.00
▷ Maximum class complexity72.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods88
▷ Static methods3236.36%
▷ Public methods7989.77%
▷ Protected methods00.00%
▷ Private methods910.23%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/a5-icon-11.png0.67KB0.42KB▼ 37.17%
img/a5-icon-34.png1.65KB1.35KB▼ 18.07%