78% customize-widgets

Code Review | Customize Widgets

WordPress plugin Customize Widgets scored78%from 54 tests.

About plugin

  • Plugin page: customize-widgets
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Aug 14, 2015
  • Latest release: Aug 19, 2015
  • Number of updates: 8
  • Update frequency: every 0.9 days
  • Top authors: Avranu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Customize Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.62 ▼2.29
Dashboard /wp-admin3.31 ▲0.0144.53 ▼1.66
Posts /wp-admin/edit.php3.36 ▲0.0148.88 ▲4.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.74 ▼9.84
Media Library /wp-admin/upload.php3.23 ▲0.0032.73 ▼1.18
Customize Widgets /wp-admin/themes.php?page=customize-widgets3.1828.21

Server storage [IO: ▲1.19MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Customize Widgets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▲0.111.66 ▼0.0637.96 ▲0.41
Dashboard /wp-admin2,199 ▲185.61 ▼0.0790.73 ▼12.3639.37 ▼5.67
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0639.74 ▼0.2835.29 ▼1.05
Add New Post /wp-admin/post-new.php1,529 ▲323.49 ▲0.78664.17 ▲37.9354.35 ▲5.30
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.0695.58 ▼0.4640.21 ▼0.66
Customize Widgets /wp-admin/themes.php?page=customize-widgets8631.9424.4033.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/themes.php?page=customize-widgets
    • > Notice in wp-content/plugins/customize-widgets/customize-widgets.php+114
    Undefined variable: hidden_field_name

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/customize-widgets/customize-widgets.php

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 88% 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 your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === customize-widgets === )
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

customize-widgets/customize-widgets.php Passed 13 tests

The primary PHP file in "Customize Widgets" version 1.0 is used by WordPress to initiate all plugin functionality
114 characters long description:
Widgets cluttering up your site? This plugin allows you to hide unused widgets from appearing on the widgets page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected224 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS11123119
PHP13027105

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods266.67%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
205 PNG files occupy 1.17MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/blue/fs-paragraph.png5.02KB2.56KB▼ 49.00%
images/blue/fs-file_video.png4.65KB2.28KB▼ 50.85%
images/blue/fs-picture.png4.54KB2.25KB▼ 50.60%
images/blue/fs-newspaper.png4.37KB2.12KB▼ 51.39%
images/blue/fs-rotate.png6.24KB2.88KB▼ 53.86%