10% show-widget-area-names

Code Review | Show Widget Area Names (SWAN)

WordPress plugin Show Widget Area Names (SWAN) scored10%from 54 tests.

About plugin

  • Plugin page: show-widget-area-...
  • Plugin version: 1.0.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.1
  • WordPress version: 6.3.1
  • First release: Oct 12, 2012
  • Latest release: Feb 10, 2015
  • Number of updates: 75
  • Update frequency: every 21.1 days
  • Top authors: kmfj1 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /2,971 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
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ShowWidgetTitle::set_options() should not be called statically

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.07ms] Passed 4 tests

This is a short check of server-side resources used by Show Widget Area Names (SWAN)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.14 ▲9.92
Dashboard /wp-admin3.31 ▼0.0442.69 ▼16.04
Posts /wp-admin/edit.php3.36 ▲0.0045.34 ▲0.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.22 ▼14.30
Media Library /wp-admin/upload.php3.23 ▲0.0036.65 ▲1.64

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
swan-persist
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Show Widget Area Names (SWAN)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12913.64 ▼0.648.52 ▲6.7543.97 ▼1.30
Dashboard /wp-admin2,198 ▲235.71 ▲0.0190.06 ▼8.9636.36 ▼5.70
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0640.19 ▲5.0535.98 ▼2.99
Add New Post /wp-admin/post-new.php1,525 ▼123.18 ▲0.17667.61 ▼27.6349.72 ▼9.58
Media Library /wp-admin/upload.php1,391 ▼94.20 ▼0.0198.28 ▼4.6445.21 ▲1.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'ShowWidgetTitle' does not have a method 'delete_options'
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • swan-persist
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/show-widget-area-names/show-widget-area-names.php:80

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === show-widget-area-names === )
  • Screenshots: Screenshot #1 (How the widget name is outputted on the page.) image not found
You can look at the official readme.txt

show-widget-area-names/show-widget-area-names.php Passed 13 tests

The main file in "Show Widget Area Names (SWAN)" v. 1.0.18 serves as a complement to information provided in readme.txt and as the entry point to the plugin
121 characters long description:
SWAN displays the widget area names on non-admin pages and posts. This adds the title to widget $params['before_widget'].

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
Success! There were no dangerous files found in this plugin73 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1143045
JavaScript16016
CSS10012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods466.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin