72% custom-sidebar-manager

Code Review | Custom Sidebars Manager

WordPress plugin Custom Sidebars Manager scored72%from 54 tests.

About plugin

  • Plugin page: custom-sidebar-ma...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Sep 3, 2015
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: FRESHFACE (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,049 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.06MB] [CPU: ▼38.90ms] Passed 4 tests

Server-side resources used by Custom Sidebars Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4717.25 ▼23.98
Dashboard /wp-admin3.95 ▲0.6419.85 ▼27.86
Posts /wp-admin/edit.php3.95 ▲0.5917.63 ▼29.54
Add New Post /wp-admin/post-new.php3.95 ▼1.9417.64 ▼74.20
Media Library /wp-admin/upload.php3.95 ▲0.7222.93 ▼13.07
Sidebars /wp-admin/themes.php?page=SidebarManager4.0917.95

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 706 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
ffpf_caching_dir_144051733000cbe9381e18e94c8209bf
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Custom Sidebars Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7314.48 ▲0.051.83 ▼0.3842.77 ▼2.85
Dashboard /wp-admin2,209 ▲185.83 ▲0.96100.18 ▼13.4337.74 ▼6.77
Posts /wp-admin/edit.php2,092 ▲61.99 ▲0.0233.97 ▼7.1731.19 ▼6.59
Add New Post /wp-admin/post-new.php1,519 ▼117.79 ▼5.41684.14 ▼11.7449.62 ▼6.59
Media Library /wp-admin/upload.php1,394 ▲34.24 ▲0.0097.48 ▼7.1543.90 ▼2.68
Sidebars /wp-admin/themes.php?page=SidebarManager12,9845.36260.5332.59

Uninstaller [IO: ▲0.15MB] [DB: ▲0.05MB] 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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ffpf_caching_dir_144051733000cbe9381e18e94c8209bf
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=SidebarManager
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+66
    fopen(wp-content/uploads/freshframework/less_scss/last_deletion.frs): failed to open stream: No such file or directory
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=SidebarManager
    • > Notice in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/extern/less/lib/Less/Parser.php+1724
    Trying to access array offset on value of type null
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=SidebarManager
    • > Warning in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/query/posts/items/class.ffPostGetter.php+75
    count(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=SidebarManager
    • > Deprecated in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/extern/less/lib/Less/Tree/Mixin/Call.php+110
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/extern/iconfonts/fonts.php
  • 329× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/query/taxonomies/registrator/class.ffCustomTaxonomyManager.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/extern/less/lib/Less/Tree/Expression.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/query/identificators/taxonomy/class.ffCustomTaxonomyCollection.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/extern/less/lib/Less/Tree/Value.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ffModalWindowBasicObject' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/adminScreens/modalWindow/class.ffModalWindow.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/query/users/class.ffUserRoleManager.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/options/dataHolders/class.ffOneSection.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ffFactoryAbstract' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/adminScreens/factories/class.ffAdminScreenViewFactory.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/bootstrap.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ffBasicObject' not found in wp-content/plugins/custom-sidebar-manager/fresh-framework/framework/themes/functions/class.ffThemeViewIdentificator.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: sidebar manager, custom sidebars

custom-sidebar-manager/freshplugin.php 92% from 13 tests

"Custom Sidebars Manager" version 1.1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-sidebar-manager.php" instead of "freshplugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin104,987 lines of code in 587 files:
LanguageFilesBlank linesComment linesLines of code
PHP37112,69111,79737,711
JSON20024,734
JavaScript734,9305,50821,077
LESS731,7891,7488,217
CSS383295276,969
SVG24005,950
XML200253
HTML22069
Markdown2407

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 156)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.52
▷ Minimum class complexity1.00
▷ Maximum class complexity446.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity156.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes420
▷ Abstract classes235.48%
▷ Concrete classes39794.52%
▷ Final classes00.00%
Methods4,064
▷ Static methods741.82%
▷ Public methods2,27956.08%
▷ Protected methods1,13327.88%
▷ Private methods65216.04%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants371
▷ Global constants9926.68%
▷ Class constants27273.32%
▷ Public constants272100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
27 PNG files occupy 0.15MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fresh-framework/framework/adminScreens/assets/images/modal-library-size-slider-control-left@2x.png5.81KB0.10KB▼ 98.22%
fresh-framework/framework/adminScreens/assets/images/repeatable_boxed_icon_plus.png5.81KB0.11KB▼ 98.19%
fresh-framework/framework/extern/jstree/themes/default/32px.png3.05KB2.88KB▼ 5.58%
fresh-framework/framework/extern/select2/select2x2.png0.83KB0.77KB▼ 6.15%
fresh-framework/framework/extern/jquery-ui/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%