94% register-sidebar-by-admin

Code Review | Register Sidebars By Admin

WordPress plugin Register Sidebars By Admin scored 94% from 54 tests.

About plugin

  • Plugin page: register-sidebar-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2
  • WordPress version: 5.8.1
  • First release: Dec 4, 2018
  • Latest release: Aug 27, 2019
  • Number of updates: 10
  • Update frequency: every 26.8 days
  • Top authors: p4wparamjeet (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 364 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.47ms] Passed 4 tests

An overview of server-side resources used by Register Sidebars By Admin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1636.44 ▲14.37
Dashboard /wp-admin3.11 ▲0.0546.65 ▼3.06
Posts /wp-admin/edit.php3.16 ▲0.0548.36 ▲1.66
Add New Post /wp-admin/post-new.php5.47 ▲0.0391.36 ▼564.87
Media Library /wp-admin/upload.php3.05 ▲0.0535.83 ▲0.41
Register Sidebars By Admin /wp-admin/themes.php?page=dynamic-register-sidebars-by-admin-page3.0228.61

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Register Sidebars By Admin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.97 ▲0.407.71 ▼2.3947.71 ▲1.29
Dashboard /wp-admin2,977 ▲405.91 ▼0.09135.12 ▼25.74120.06 ▼5.55
Posts /wp-admin/edit.php2,749 ▲102.70 ▲0.0071.55 ▲3.0190.49 ▼12.21
Add New Post /wp-admin/post-new.php1,610 ▲2918.58 ▼1.54380.03 ▼13.52109.42 ▼2.49
Media Library /wp-admin/upload.php1,820 ▲135.04 ▲0.03152.41 ▼4.51124.36 ▲1.82
Register Sidebars By Admin /wp-admin/themes.php?page=dynamic-register-sidebars-by-admin-page1,1182.0961.0078.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 plugin_dir_path() in wp-content/plugins/register-sidebar-by-admin/register-sidebar-by-admin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (After activate this plugin go to plugin settings by click on "settings". You can also find the plugin settings by 'Appearance > Register Sidebars' menu in your WordPress backend like as above screen.), #2 (Now, you can register sidebars like as above screen.), #3 (Here, you would be able to reivew your registered siderbars.), #4 (You can display use sidebar key (show in red box) like as above screen.)
The official readme.txt might help

register-sidebar-by-admin/register-sidebar-by-admin.php Passed 13 tests

The main file in "Register Sidebars By Admin" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
47 characters long description:
Dynamic sidebar manage by wordpress admin panel

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
Success! There were no dangerous files found in this plugin276 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1816212
CSS11033
JavaScript10031

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.78KB18.13KB▼ 49.34%
screenshot-3.png65.05KB31.53KB▼ 51.53%
screenshot-2.png40.69KB20.34KB▼ 50.00%
screenshot-4.png35.92KB18.19KB▼ 49.36%