79% collapsible-pages-widget

Code Review | Collapsible Pages Widget

WordPress plugin Collapsible Pages Widget scored 79% from 54 tests.

About plugin

  • Plugin page: collapsible-pages...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Nov 27, 2014
  • Latest release: Apr 6, 2016
  • Number of updates: 39
  • Update frequency: every 12.7 days
  • Top authors: adamschoenemann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,270 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.18ms] Passed 4 tests

An overview of server-side resources used by Collapsible Pages Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.82 ▼8.74
Dashboard /wp-admin3.40 ▲0.0946.46 ▲0.17
Posts /wp-admin/edit.php3.51 ▲0.1549.83 ▲1.88
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.87 ▼14.03
Media Library /wp-admin/upload.php3.32 ▲0.0938.17 ▲2.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_collapsible_pages_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Collapsible Pages Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.57 ▼1.169.13 ▲7.4339.98 ▲0.53
Dashboard /wp-admin2,206 ▲214.88 ▼1.00111.34 ▲0.4342.32 ▲2.48
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0739.20 ▲1.8935.40 ▲0.37
Add New Post /wp-admin/post-new.php1,533 ▼923.25 ▲4.98615.38 ▼43.5347.65 ▼12.48
Media Library /wp-admin/upload.php1,385 ▼04.19 ▼0.02101.62 ▼1.4545.56 ▲0.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_collapsible_pages_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/collapsible-pages-widget/collapsible-pages-widget.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Node' not found in wp-content/plugins/collapsible-pages-widget/node-test.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: fold, nested, folding, pages, collapsible...

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

The main PHP file in "Collapsible Pages Widget" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
A brief description of the plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin498 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP310072438
CSS110033
JavaScript18027

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin