73% content-sidebars

Code Review | Content Sidebars

WordPress plugin Content Sidebars scored73%from 54 tests.

About plugin

  • Plugin page: content-sidebars
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2017
  • Latest release: Apr 19, 2022
  • Number of updates: 16
  • Update frequency: every 117.3 days
  • Top authors: majick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,823 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.42MB] [CPU: ▼3.29ms] Passed 4 tests

A check of server-side resources used by Content Sidebars
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5038.03 ▼9.40
Dashboard /wp-admin4.26 ▲0.9555.36 ▲8.87
Posts /wp-admin/edit.php3.87 ▲0.5248.30 ▲8.16
Add New Post /wp-admin/post-new.php6.04 ▲0.1676.48 ▼15.16
Media Library /wp-admin/upload.php3.74 ▲0.5239.21 ▲3.25
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius4.0737.63
WordQuest /wp-admin/admin.php?page=wordquest4.1048.48
Content Sidebars /wp-admin/themes.php?page=flexi-content-sidebars3.6936.54
Content Sidebars /wp-admin/admin.php?page=content-sidebars3.7236.91

Server storage [IO: ▲3.54MB] [DB: ▲0.20MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 182 new files
Database: no new tables, 16 new options
New WordPress options
wq
fs_debug_mode
widget_discrete_text
fcs_sidebar_options
db_upgraded
content_sidebars
wq_sidebar_options
fs_active_plugins
fs_accounts
fs_gdpr
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Sidebars
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲30414.44 ▲0.091.77 ▼0.2027.11 ▼21.08
Dashboard /wp-admin2,482 ▲3054.96 ▼0.7485.04 ▼3.0291.29 ▲51.15
Posts /wp-admin/edit.php2,198 ▲982.04 ▲0.0636.52 ▼0.4534.60 ▼3.81
Add New Post /wp-admin/post-new.php6,663 ▲5,12629.71 ▲11.63890.17 ▲233.9376.62 ▲0.32
Media Library /wp-admin/upload.php1,473 ▲734.24 ▲0.12106.19 ▼12.3966.75 ▲18.64
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,1221.8226.2629.54
WordQuest /wp-admin/admin.php?page=wordquest1,7302.4330.5874.59
Content Sidebars /wp-admin/themes.php?page=flexi-content-sidebars1,0411.7032.6455.27
Content Sidebars /wp-admin/admin.php?page=content-sidebars1,1001.7726.9336.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/content-sidebars/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 16 options in the database
    • fcs_sidebar_options
    • fs_debug_mode
    • can_compress_scripts
    • wq_sidebar_options
    • fs_gdpr
    • db_upgraded
    • wq
    • content_sidebars_first_install
    • widget_recent-posts
    • content_sidebars
    • ...

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_action() in wp-content/plugins/content-sidebars/wordquest.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-sidebars/loader.php:2924

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: Please take inspiration from this readme.txt

content-sidebars/loader.php 92% from 13 tests

"Content Sidebars" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("content-sidebars.php" instead of "loader.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin39,833 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1118,99219,46839,224
Markdown11220356
JavaScript33459194
CSS127232
JSON10027

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,910)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 118)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity93.25
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity118.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,292
▷ Static methods17313.39%
▷ Public methods94372.99%
▷ Protected methods241.86%
▷ Private methods32525.15%
Functions223
▷ Named functions19687.89%
▷ Anonymous functions2712.11%
Constants137
▷ Global constants11181.02%
▷ Class constants2618.98%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cross.png1.22KB1.11KB▼ 9.04%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
images/wpmedic.png4.65KB2.48KB▼ 46.68%
images/wordquest-icon.png1.24KB1.23KB0.40%
images/wordquest.png7.71KB3.13KB▼ 59.40%