84% network-sidebar-widgets

Code Review | Network Sidebar Widgets

WordPress plugin Network Sidebar Widgets scored84%from 54 tests.

About plugin

  • Plugin page: network-sidebar-w...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Aug 1, 2016
  • Latest release: Aug 1, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: rfair404 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /572 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼6.80ms] Passed 4 tests

This is a short check of server-side resources used by Network Sidebar Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0444.63 ▲2.24
Dashboard /wp-admin3.33 ▼0.0248.91 ▼17.56
Posts /wp-admin/edit.php3.38 ▲0.0247.85 ▼0.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.56 ▼10.67
Media Library /wp-admin/upload.php3.25 ▲0.0238.59 ▲1.12

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Network Sidebar Widgets: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.25 ▼0.341.89 ▼0.0644.55 ▼3.85
Dashboard /wp-admin2,195 ▲185.66 ▲0.0991.72 ▼11.1941.94 ▼3.72
Posts /wp-admin/edit.php2,097 ▼02.00 ▼0.0440.72 ▲3.1336.03 ▼0.11
Add New Post /wp-admin/post-new.php1,423 ▼12018.11 ▼5.02585.83 ▼68.6846.67 ▼6.86
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.04103.55 ▲0.5948.37 ▲1.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 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/network-sidebar-widgets/class-network-sidebar-fallback.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: sidebar, multisite, widget

network-sidebar-widgets/network-sidebar-fallback.php 85% from 13 tests

This is the main PHP file of "Network Sidebar Widgets" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 198 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("network-sidebar-widgets.php" instead of "network-sidebar-fallback.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2183667

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

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