84% sane-widget-sidebar-management

Code Review | Sane Widget Sidebar Management

WordPress plugin Sane Widget Sidebar Managementscored84%from 54 tests.

About plugin

  • Plugin page: sane-widget-sideb...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 6.3.1
  • First release: Aug 4, 2013
  • Latest release: Aug 13, 2013
  • Number of updates: 9
  • Update frequency: every 1.0 days
  • Top authors: jtsternberg (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

50+ active /4,176 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Sane Widget Sidebar Management
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.22 ▲2.76
Dashboard /wp-admin3.31 ▼0.0442.12 ▼19.16
Posts /wp-admin/edit.php3.36 ▲0.0048.17 ▼1.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.86 ▼17.23
Media Library /wp-admin/upload.php3.23 ▲0.0031.82 ▼1.75

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Sane Widget Sidebar Management
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.131.77 ▲0.2044.73 ▲0.58
Dashboard /wp-admin2,195 ▲185.50 ▼0.1181.34 ▼8.1639.31 ▼3.55
Posts /wp-admin/edit.php2,100 ▼31.98 ▲0.0336.31 ▼6.4232.96 ▼4.00
Add New Post /wp-admin/post-new.php1,536 ▲1018.09 ▼4.87646.82 ▼27.2171.87 ▲11.03
Media Library /wp-admin/upload.php1,394 ▼94.19 ▼0.0696.88 ▼3.2642.55 ▼1.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sane-widget-sidebar-management/sane-widget-sidebar-management.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Sane Widget Sidebar Management=== )
  • Screenshots: Add images for these screenshots: #1 (New and hawt.), #2 (Old and busted.), #3 (Widget area scrolls with you. No more trying to drag outside of the viewing area.)
The official readme.txt is a good inspiration

sane-widget-sidebar-management/sane-widget-sidebar-management.php Passed 13 tests

The principal PHP file in "Sane Widget Sidebar Management" v. 1.0.1 is loaded by WordPress automatically on each request
55 characters long description:
Manage one sidebar at a time to maintain widget sanity.

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 detected106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP161363
JavaScript110643

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin