88% dynamically-dynamic-sidebar

Code Review | Dynamically Dynamic Sidebar

WordPress plugin Dynamically Dynamic Sidebar scored 88% from 54 tests.

About plugin

  • Plugin page: dynamically-dynam...
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6.1
  • WordPress version: 5.8.1
  • First release: Nov 16, 2015
  • Latest release: Sep 9, 2016
  • Number of updates: 9
  • Update frequency: every 33.2 days
  • Top authors: ShinichiN (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,250 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.09MB] [CPU: ▼141.02ms] Passed 4 tests

Analyzing server-side resources used by Dynamically Dynamic Sidebar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.0844.27 ▲0.56
Dashboard /wp-admin3.15 ▲0.1057.98 ▲3.82
Posts /wp-admin/edit.php3.24 ▲0.1352.82 ▼0.31
Add New Post /wp-admin/post-new.php5.51 ▲0.08100.60 ▼566.53
Media Library /wp-admin/upload.php3.10 ▲0.0940.75 ▲2.21
Dynamically dynamic sidebar /wp-admin/themes.php?page=dynamically-dynamic-sidebar3.0433.44

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Dynamically Dynamic Sidebar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,694 ▲9815.82 ▲0.2711.89 ▼2.5350.39 ▲1.01
Dashboard /wp-admin2,972 ▲385.94 ▼0.11148.03 ▼16.52120.30 ▲5.02
Posts /wp-admin/edit.php2,757 ▲182.72 ▲0.0291.93 ▲16.0891.01 ▼2.47
Add New Post /wp-admin/post-new.php1,686 ▲318.46 ▼0.20446.05 ▲19.38115.40 ▼2.41
Media Library /wp-admin/upload.php1,812 ▲55.04 ▼0.03193.70 ▲15.77128.04 ▲2.33
Dynamically dynamic sidebar /wp-admin/themes.php?page=dynamically-dynamic-sidebar1,1962.0955.9288.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=dynamically-dynamic-sidebar
    • > Warning in wp-content/plugins/dynamically-dynamic-sidebar/inc/admin-main.php+177
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 10× 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/dynamically-dynamic-sidebar/inc/admin-post.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/main.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/dynamically-dynamic-sidebar.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/admin-post.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/inc/admin-main.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/admin-term.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/admin-main.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/inc/main.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamically-dynamic-sidebar/inc/admin-term.php:9
    • > PHP Notice
      Undefined index: wp_version in wp-content/plugins/dynamically-dynamic-sidebar/dynamically-dynamic-sidebar.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: widget area, sidebar, widget

dynamically-dynamic-sidebar/dynamically-dynamic-sidebar.php 92% from 13 tests

Analyzing the main PHP file in "Dynamically Dynamic Sidebar" version 0.7
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin597 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6218216556
Markdown228041

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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