73% content-aware-sidebars

Code Review | Lightweight Widget Area Plugin - Content Aware Sidebars

WordPress plugin Lightweight Widget Area Plugin - Content Aware Sidebars scored73%from 54 tests.

About plugin

  • Plugin page: content-aware-sid...
  • Plugin version: 3.19.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 3, 2011
  • Latest release: Nov 23, 2023
  • Number of updates: 270
  • Update frequency: every 16.7 days
  • Top authors: intoxstudio (100%)

Code review

54 tests

User reviews

707 reviews

Install metrics

40,000+ active /1,438,948 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.74MB] [CPU: ▲30.51ms] 75% from 4 tests

An overview of server-side resources used by Lightweight Widget Area Plugin - Content Aware Sidebars
Please take the time to fix the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.74MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.50 ▲6.0473.80 ▲30.43
Dashboard /wp-admin9.52 ▲6.1785.56 ▲18.50
Posts /wp-admin/edit.php9.53 ▲6.1696.24 ▲43.93
Add New Post /wp-admin/post-new.php10.47 ▲4.57127.11 ▲30.23
Media Library /wp-admin/upload.php9.52 ▲6.2977.86 ▲42.86
/wp-admin/admin.php?page=wpcas-settings9.5269.31
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.5267.39

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 325 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
fs_accounts
fs_active_plugins
fs_debug_mode
widget_recent-comments
cas_db_version
can_compress_scripts
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Lightweight Widget Area Plugin - Content Aware Sidebars
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9514.67 ▼0.041.50 ▼0.1330.28 ▼13.63
Dashboard /wp-admin2,224 ▲505.53 ▼0.0798.09 ▲0.0446.58 ▲0.58
Posts /wp-admin/edit.php2,130 ▲301.97 ▲0.0041.61 ▲4.7339.20 ▼0.33
Add New Post /wp-admin/post-new.php1,582 ▲5621.49 ▼1.96676.36 ▲16.2163.06 ▲5.93
Media Library /wp-admin/upload.php1,429 ▲294.18 ▲0.0499.38 ▲4.1345.00 ▲3.41
/wp-admin/admin.php?page=wpcas-settings8532.0727.4728.56
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0811.6626.7030.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/content-aware-sidebars/lib/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • fs_active_plugins
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_accounts
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_debug_mode
    • _ca_condition_type_cache
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 18× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-aware-sidebars/lib/wp-content-aware-engine/view/meta_box.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/content-aware-sidebars/view/meta_box_advanced.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/content-aware-sidebars/view/top_bar.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/content-aware-sidebars/view/sidebars_quick_select.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/content-aware-sidebars/view/meta_box_design.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cas_fs() in wp-content/plugins/content-aware-sidebars/view/meta_box_submit.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/content-aware-sidebars/view/account_login.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CAS_App' not found in wp-content/plugins/content-aware-sidebars/view/meta_box_status.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/content-aware-sidebars/lib/wp-content-aware-engine/view/group_template.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'CAS_App' not found in wp-content/plugins/content-aware-sidebars/view/meta_box_html.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #2, #3 in content-aware-sidebars/assets to your readme.txt
  • Donate link: Please fix this invalid URI: "#"
Please take inspiration from this readme.txt

content-aware-sidebars/content-aware-sidebars.php Passed 13 tests

The main PHP script in "Lightweight Widget Area Plugin - Content Aware Sidebars" version 3.19.3 is automatically included on every request by WordPress
76 characters long description:
Unlimited custom sidebars and widget areas for any post, page, category etc.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin41,251 lines of code in 209 files:
LanguageFilesBlank linesComment linesLines of code
PHP1759,15320,18639,968
CSS16034850
JavaScript1355106311
XML3275077
Markdown212045

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity63.21
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes85
▷ Abstract classes44.71%
▷ Concrete classes8195.29%
▷ Final classes78.64%
Methods1,626
▷ Static methods24415.01%
▷ Public methods1,16571.65%
▷ Protected methods684.18%
▷ Private methods39324.17%
Functions121
▷ Named functions11494.21%
▷ Anonymous functions75.79%
Constants187
▷ Global constants10154.01%
▷ Class constants8645.99%
▷ Public constants86100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
lib/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/img/icon.png4.44KB4.16KB▼ 6.32%