74% featured-post-widget-link-to-category

Code Review | Featured Post Widget - Link to Category

WordPress plugin Featured Post Widget - Link to Category scored74%from 54 tests.

About plugin

  • Plugin page: featured-post-wid...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: May 30, 2013
  • Latest release: May 31, 2013
  • Number of updates: 2
  • Update frequency: every 14.5 days
  • Top authors: brianmyrick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,908 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼46.26ms] Passed 4 tests

A check of server-side resources used by Featured Post Widget - Link to Category
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.58 ▼29.59
Dashboard /wp-admin2.29 ▼1.0110.20 ▼35.29
Posts /wp-admin/edit.php2.29 ▼1.0612.66 ▼33.04
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.99 ▼87.10
Media Library /wp-admin/upload.php2.29 ▼0.949.77 ▼25.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_featured-post-category
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Featured Post Widget - Link to Category
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.181.68 ▲0.1239.27 ▼4.15
Dashboard /wp-admin2,192 ▲155.55 ▼0.1182.02 ▼5.6442.58 ▲3.64
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0232.84 ▼7.4534.10 ▼3.91
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▲0.09679.41 ▲25.3667.73 ▲16.12
Media Library /wp-admin/upload.php1,397 ▼64.15 ▼0.03100.25 ▲5.3544.88 ▲0.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Genesis_Featured_Post_Category is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_featured-post-category
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-post-widget-link-to-category/featured-post-category-widget.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === featured-post-widget-link-to-category === )
You can take inspiration from this readme.txt

featured-post-widget-link-to-category/featured-post-category-widget.php 92% from 13 tests

This is the main PHP file of "Featured Post Widget - Link to Category" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("featured-post-widget-link-to-category.php" instead of "featured-post-category-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin285 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18672285

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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