94% widget-attributes

Code Review | Widget Attributes

WordPress plugin Widget Attributes scored 94% from 54 tests.

About plugin

  • Plugin page: widget-attributes
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.4
  • WordPress version: 5.9.2
  • First release: Oct 22, 2013
  • Latest release: Nov 18, 2015
  • Number of updates: 13
  • Update frequency: every 58.2 days
  • Top authors: kucrut (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 1,812 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼314.86ms] Passed 4 tests

A check of server-side resources used by Widget Attributes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0363.96 ▲6.88
Dashboard /wp-admin3.44 ▲0.0235.66 ▼0.62
Posts /wp-admin/edit.php3.67 ▲0.0244.92 ▲3.49
Add New Post /wp-admin/post-new.php6.91 ▼0.0799.39 ▼1,265.43
Media Library /wp-admin/upload.php3.32 ▲0.0229.30 ▲3.12

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Widget Attributes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.30 ▲0.515.90 ▼1.502.09 ▼0.58
Dashboard /wp-admin2,892 ▲316.14 ▼0.02116.93 ▼16.52218.81 ▲62.51
Posts /wp-admin/edit.php2,688 ▼63.24 ▼0.0064.22 ▲1.91138.73 ▼3.41
Add New Post /wp-admin/post-new.php1,668 ▼2218.12 ▼2.70400.18 ▼18.96198.42 ▼7.11
Media Library /wp-admin/upload.php1,695 ▼35.53 ▲0.03131.20 ▼14.89185.18 ▼28.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-attributes/widget-attributes.php:204

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: widget

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

Analyzing the main PHP file in "Widget Attributes" version 0.2.2
48 characters long description:
Assign custom widget attributes (classes and ID)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin116 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12662116

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.35
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin