84% collapsible-widget-area

Code Review | Collapsible Widget Area

WordPress plugin Collapsible Widget Area scored84%from 54 tests.

About plugin

  • Plugin page: collapsible-widge...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Jan 20, 2012
  • Latest release: Apr 3, 2018
  • Number of updates: 22
  • Update frequency: every 103.0 days
  • Top authors: cgrymala (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /15,193 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.37ms] Passed 4 tests

Analyzing server-side resources used by Collapsible Widget Area
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1635.65 ▼4.48
Dashboard /wp-admin3.47 ▲0.1646.67 ▼4.85
Posts /wp-admin/edit.php3.58 ▲0.2249.39 ▲4.50
Add New Post /wp-admin/post-new.php6.07 ▲0.1792.68 ▼5.97
Media Library /wp-admin/upload.php3.39 ▲0.1634.11 ▼2.16
Collapsible Widget Options /wp-admin/options-general.php?page=collapsible-widgets3.3532.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_collapsible-widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Collapsible Widget Area
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.541.73 ▼0.1442.64 ▼1.27
Dashboard /wp-admin2,213 ▲255.91 ▲1.0298.48 ▼5.3838.85 ▼3.50
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0436.80 ▲1.8535.02 ▲6.35
Add New Post /wp-admin/post-new.php1,536 ▲723.04 ▲4.64614.81 ▼33.7757.78 ▲1.19
Media Library /wp-admin/upload.php1,386 ▼24.29 ▲0.0698.10 ▲0.4141.58 ▼2.86
Collapsible Widget Options /wp-admin/options-general.php?page=collapsible-widgets9382.0624.8228.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_collapsible-widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/collapsible-widget-area/class.collapsible-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/collapsible-widget-area/collapsible-widget-area.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (An accordion-style interface in the TwentyEleven WordPress theme's Main Sidebar, with the "UI Lightness" jQueryUI theme applied), #2 (An accordion-style interface in the TwentyEleven WordPress theme's Main Sidebar, with the "UI Darkness" jQueryUI theme applied), #3 (A tabbed interface in the TwentyEleven Footer Area One, with the "Base" jQueryUI theme applied), #4 (A tabbed interface in the TwentyEleven Footer Area One, with the "Cupertino" jQueryUI theme applied)
You can take inspiration from this readme.txt

collapsible-widget-area/collapsible-widget-area.php Passed 13 tests

The primary PHP file in "Collapsible Widget Area" version 1.0 is used by WordPress to initiate all plugin functionality
113 characters long description:
Allows you to set up a tabbed or accordion-style widget area to be displayed wherever you choose within WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected907 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP39197624
Markdown1800147
JavaScript42028132
CSS1114

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity53.00
▷ Minimum class complexity46.00
▷ Maximum class complexity60.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2896.55%
▷ Protected methods13.45%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.03MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png6.94KB6.87KB▼ 1.00%
screenshot-1.png6.35KB6.24KB▼ 1.65%
screenshot-3.png7.05KB6.91KB▼ 1.99%
screenshot-4.png8.82KB8.70KB▼ 1.27%