94% cg-dynamic-sidebar

Code Review | CG Dynamic Sidebar

WordPress plugin CG Dynamic Sidebar scored 94% from 54 tests.

About plugin

  • Plugin page: cg-dynamic-sidebar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.1
  • WordPress version: 5.9.2
  • First release: Jun 7, 2016
  • Latest release: Mar 11, 2019
  • Number of updates: 17
  • Update frequency: every 59.3 days
  • Top authors: chandan_garg_129 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,938 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼291.42ms] Passed 4 tests

Server-side resources used by CG Dynamic Sidebar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0257.97 ▲5.07
Dashboard /wp-admin3.43 ▲0.0337.54 ▲2.26
Posts /wp-admin/edit.php3.66 ▲0.0242.09 ▲0.36
Add New Post /wp-admin/post-new.php6.90 ▼0.07100.92 ▼1,170.95
Media Library /wp-admin/upload.php3.31 ▲0.0228.89 ▲2.65

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for CG Dynamic Sidebar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,792 ▲3816.01 ▲0.345.92 ▼0.562.03 ▼0.55
Dashboard /wp-admin2,904 ▲466.03 ▼0.28117.81 ▼20.16157.53 ▼4.08
Posts /wp-admin/edit.php2,697 ▲33.25 ▲0.0166.03 ▼1.27142.84 ▼1.14
Add New Post /wp-admin/post-new.php1,675 ▼1519.92 ▼0.72397.99 ▼46.84154.10 ▼2.73
Media Library /wp-admin/upload.php1,707 ▲65.64 ▲0.11139.09 ▲1.59188.47 ▼1.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please take a closer look at 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/cg-dynamic-sidebar/cg-dynamic-sidebar.php:70

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (**Creating new sidebar** - It show's the area in your admin widget screen from where you can add your custom sidebar), #2 (**New sidebar area** - It shows newly created sidebar area in your admin widget screen.), #3 (**Remove Widget** - It clicked on Remove Sidebar, It will ask for confirmation, if cliked on Remove, it will delete the sidebar or nothing will happen), #4 (**Adding widget to sidebar** - If you will click on any widget, it will have list of all your sidebar areas to select, you can select as per your choice and click on add widget to add in your selected sidebar. You can also drag and drop your widget in your custom created sidebar.), #5 (**Widget Added successfully** - After you added your widget to your sidebar, it will show in your custom create sidebar area.)
You can take inspiration from this readme.txt

cg-dynamic-sidebar/cg-dynamic-sidebar.php Passed 13 tests

The entry point to "CG Dynamic Sidebar" version 1.0 is a PHP file that has certain tags in its header comment area
59 characters long description:
Plugin for creating dynamic sidebar area at wordpress admin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin173 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1315109
JavaScript11044
CSS18020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png9.72KB4.34KB▼ 55.41%
screenshot-3.png12.54KB5.58KB▼ 55.54%
screenshot-1.png10.81KB5.01KB▼ 53.64%
screenshot-5.png12.80KB5.74KB▼ 55.13%
screenshot-2.png11.28KB5.20KB▼ 53.88%