90% widget-labels

Code Review | Widget Labels

WordPress plugin Widget Labels scored90%from 54 tests.

About plugin

  • Plugin page: widget-labels
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Apr 24, 2016
  • Number of updates: 6
  • Update frequency: every 2.8 days
  • Top authors: maor (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Widget Labels
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.87 ▼3.73
Dashboard /wp-admin3.31 ▲0.0153.44 ▼2.70
Posts /wp-admin/edit.php3.36 ▲0.0150.23 ▼4.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.46 ▼21.25
Media Library /wp-admin/upload.php3.23 ▲0.0141.32 ▲4.43

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget Labels
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.59 ▼0.792.08 ▲0.2640.15 ▼2.33
Dashboard /wp-admin2,215 ▲84.94 ▼0.09132.54 ▲12.3942.12 ▼1.92
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0138.19 ▲0.9138.42 ▲2.72
Add New Post /wp-admin/post-new.php1,547 ▲223.15 ▲0.01634.08 ▼53.8547.66 ▼58.79
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.07111.46 ▼3.5747.32 ▼2.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: widgets, label, widget, widget label

widget-labels/widget-labels.php Passed 13 tests

The main PHP file in "Widget Labels" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
62 characters long description:
Allows you to use custom labels/titles for any of your Widgets

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 plugin87 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3289564
JavaScript19423

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin