90% featured-category-widget

Code Review | Featured Category Widget

WordPress plugin Featured Category Widget scored90%from 54 tests.

About plugin

  • Plugin page: featured-category...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 6.3.1
  • First release: Mar 30, 2018
  • Latest release: Apr 1, 2018
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: craigsimps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /660 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.09MB] [CPU: ▼6.63ms] Passed 4 tests

Analyzing server-side resources used by Featured Category Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0841.55 ▲1.32
Dashboard /wp-admin3.40 ▲0.1052.96 ▼4.82
Posts /wp-admin/edit.php3.52 ▲0.1653.41 ▼4.41
Add New Post /wp-admin/post-new.php5.99 ▲0.1088.66 ▼18.60
Media Library /wp-admin/upload.php3.31 ▲0.0840.73 ▲2.50

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_featured_category_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Featured Category Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲19614.77 ▲0.322.00 ▲0.2141.47 ▼3.35
Dashboard /wp-admin2,333 ▲1566.15 ▲0.50112.08 ▲10.9339.80 ▼7.16
Posts /wp-admin/edit.php2,275 ▲1753.31 ▲1.3249.16 ▲5.2231.94 ▼4.45
Add New Post /wp-admin/post-new.php1,530 ▲423.17 ▲0.29666.10 ▼6.1341.77 ▼7.61
Media Library /wp-admin/upload.php1,412 ▲124.15 ▲0.0483.41 ▼32.7648.59 ▲0.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_featured_category_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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
2 plugin tags: widget, category

featured-category-widget/featured-category-widget.php Passed 13 tests

The main PHP script in "Featured Category Widget" version 1.0.1 is automatically included on every request by WordPress
115 characters long description:
Showcase a specific category with ease, including setting a featured image and optionally listing child categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin642 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP156162254
PO File55060190
CSS213068
JavaScript111359
Sass19042
Markdown113029

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin