88% collapsing-category-list

Code Review | Collapsing Categories List

WordPress plugin Collapsing Categories List scored 88% from 54 tests.

About plugin

  • Plugin page: collapsing-catego...
  • Plugin version: 0.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-5.0
  • WordPress version: 5.9.2
  • First release: Nov 6, 2012
  • Latest release: Oct 29, 2018
  • Number of updates: 135
  • Update frequency: every 24.2 days
  • Top authors: migrad (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

900+ active / 25,680 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.24MB] [CPU: ▼294.32ms] Passed 4 tests

Server-side resources used by Collapsing Categories List
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.91 ▲1.4059.65 ▲11.53
Dashboard /wp-admin4.92 ▲1.5138.14 ▲4.39
Posts /wp-admin/edit.php5.15 ▲1.5043.86 ▲6.88
Add New Post /wp-admin/post-new.php7.55 ▲0.5783.00 ▼1,195.73
Media Library /wp-admin/upload.php4.80 ▲1.5029.44 ▲7.20
Collapsing category list /wp-admin/options-general.php?page=collapsing_category_list_admin_page8.9556.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 247 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Collapsing Categories List
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,920 ▲16616.57 ▲0.999.58 ▲3.732.49 ▼0.40
Dashboard /wp-admin2,901 ▲436.16 ▼0.02116.85 ▼24.04155.51 ▼8.58
Posts /wp-admin/edit.php2,703 ▲153.25 ▲0.0264.22 ▲0.21139.82 ▼3.77
Add New Post /wp-admin/post-new.php1,788 ▲12717.56 ▲1.41427.03 ▲20.73174.14 ▲23.37
Media Library /wp-admin/upload.php1,710 ▲125.55 ▲0.07143.21 ▲8.08187.75 ▲6.94
Collapsing category list /wp-admin/options-general.php?page=collapsing_category_list_admin_page1,3162.9757.29127.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/collapsing-category-list/administration.php
    • > /wp-content/plugins/collapsing-category-list/collapscatlist.php
  • 201× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/widget/AdminPageFramework_Widget_Factory.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/admin_page/_view/AdminPageFramework_View__PageMetaboxEnabler.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_Form_Model___Modifier_Base' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/_common/form/_model/modifier/AdminPageFramework_Form_Model___Modifier_SortInput.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_Form_Utility' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/_common/form/_model/formatter/AdminPageFramework_Form_Model___FormatSectionset.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/_common/form/field_type/AdminPageFramework_WalkerTaxonomyChecklist.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_Resource_admin_page' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/page_meta_box/_controller/AdminPageFramework_Resource_page_meta_box.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_Form_View___CSS_Base' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/_common/form/_view/css/AdminPageFramework_Form_View___CSS_FieldError.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/admin_page/_model/delegate/AdminPageFramework_Model__FormEmailHandler.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'collapsingCategoryList_AdminPageFramework_Factory_Model___Meta_Base' not found in wp-content/plugins/collapsing-category-list/libraries/admin_page_framework/factory/meta_box/_model/AdminPageFramework_MetaBox_Model___PostMeta.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
The official readme.txt might help

collapsing-category-list/collapscatlist.php 92% from 13 tests

The main PHP script in "Collapsing Categories List" version 0.5.5 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("collapsing-category-list.php" instead of "collapscatlist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected16,890 lines of code in 235 files:
LanguageFilesBlank linesComment linesLines of code
PHP2197071,96216,271
PO File26270183
CSS83645182
Ant1240130
JavaScript219289
XML21020
SVG10015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.35
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes328
▷ Abstract classes9328.35%
▷ Concrete classes23571.65%
▷ Final classes20.85%
Methods1,659
▷ Static methods23614.23%
▷ Public methods93556.36%
▷ Protected methods26115.73%
▷ Private methods46327.91%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants320.00%
▷ Class constants1280.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin