10% widget-display-options

Code Review | Widget Display Options

WordPress plugin Widget Display Options scored10%from 54 tests.

About plugin

  • Plugin page: widget-display-op...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: Apr 16, 2013
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: dojodigital (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /3,671 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/widget-display-options/widget-display-options.php+16
    Use of undefined constant WDO_MANUAL - assumed 'WDO_MANUAL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.81MB] [CPU: ▼47.01ms] Passed 4 tests

A check of server-side resources used by Widget Display Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.294.88 ▼35.63
Dashboard /wp-admin2.19 ▼1.115.96 ▼40.11
Posts /wp-admin/edit.php2.19 ▼1.166.70 ▼35.32
Add New Post /wp-admin/post-new.php2.19 ▼3.696.46 ▼76.99
Media Library /wp-admin/upload.php2.19 ▼1.046.19 ▼24.39
Widget Display Options /wp-admin/options-general.php?page=wdo-plugin-settings2.196.84

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
wdo-plugin-settings-fields
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Widget Display Options
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.18 ▼1.121.74 ▼0.1242.15 ▼2.57
Dashboard /wp-admin2,213 ▲285.85 ▼0.04103.83 ▼4.5940.91 ▼1.18
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0340.15 ▼0.4835.72 ▼1.94
Add New Post /wp-admin/post-new.php1,536 ▲2223.18 ▲5.60677.39 ▲69.1356.29 ▲1.01
Media Library /wp-admin/upload.php1,392 ▲44.19 ▲0.0094.34 ▼6.9542.88 ▼3.34
Widget Display Options /wp-admin/options-general.php?page=wdo-plugin-settings8632.0422.2226.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/widget-display-options/widget-display-options.php+16
    Use of undefined constant WDO_MANUAL - assumed 'WDO_MANUAL' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • wdo-plugin-settings-fields
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wdo-plugin-settings
    • > Warning in wp-content/plugins/widget-display-options/widget-display-options.php+16
    Use of undefined constant WDO_MANUAL - assumed 'WDO_MANUAL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=wdo-plugin-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wdo-plugin-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: conditionals, widgets

widget-display-options/widget-display-options.php 92% from 13 tests

"Widget Display Options" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,068 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5395525667
JavaScript46615229
CSS1360172

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity27.00
▷ Minimum class complexity7.00
▷ Maximum class complexity62.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods3990.70%
▷ Protected methods00.00%
▷ Private methods49.30%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
im/screenshot.png20.36KB8.05KB▼ 60.45%
im/help-icon.png1.57KB0.66KB▼ 57.58%
screenshot-1.png5.23KB4.42KB▼ 15.47%
screenshot-2.png19.04KB8.40KB▼ 55.90%