84% widget-area-chooser

Code Review | Widgets Area Chooser

WordPress plugin Widgets Area Chooser scored84%from 54 tests.

About plugin

  • Plugin page: widget-area-chooser
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 16, 2013
  • Latest release: Oct 25, 2013
  • Number of updates: 16
  • Update frequency: every 0.6 days
  • Top authors: shaunandrews (93.75%)Michael Arestad (12.5%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /2,896 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Widgets Area Chooser
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.63 ▼1.45
Dashboard /wp-admin3.31 ▲0.0151.56 ▼3.06
Posts /wp-admin/edit.php3.36 ▲0.0148.86 ▲2.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.38 ▼11.96
Media Library /wp-admin/upload.php3.23 ▲0.0034.82 ▼3.26

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

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

Browser metrics Passed 4 tests

Widgets Area Chooser: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.73 ▲0.172.29 ▲0.4839.67 ▼1.80
Dashboard /wp-admin2,221 ▲415.70 ▲0.1087.13 ▼8.1338.48 ▼5.64
Posts /wp-admin/edit.php2,123 ▲232.19 ▲0.1639.56 ▲3.4434.67 ▼1.03
Add New Post /wp-admin/post-new.php1,534 ▲623.33 ▲0.20664.28 ▼32.0237.29 ▼37.18
Media Library /wp-admin/upload.php1,423 ▲234.26 ▲0.01100.91 ▲4.5245.36 ▲0.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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 add_action() in wp-content/plugins/widget-area-chooser/widgets.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
You can look at the official readme.txt

widget-area-chooser/widgets.php 92% from 13 tests

The main file in "Widgets Area Chooser" v. 0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("widget-area-chooser.php" instead of "widgets.php")

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
Everything looks great! No dangerous files found in this plugin192 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS19292
JavaScript121390
PHP121110

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin