84% accordion-categories

Code Review | Accordion Categories

WordPress plugin Accordion Categories scored 84% from 54 tests.

About plugin

  • Plugin page: accordion-categories
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7.3
  • WordPress version: 5.8.1
  • First release: Jun 10, 2016
  • Latest release: Mar 25, 2017
  • Number of updates: 18
  • Update frequency: every 16.0 days
  • Top authors: crosp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,935 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.76ms] Passed 4 tests

A check of server-side resources used by Accordion Categories
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0657.77 ▲32.91
Dashboard /wp-admin3.12 ▲0.0532.80 ▼5.21
Posts /wp-admin/edit.php3.17 ▲0.0650.62 ▲9.67
Add New Post /wp-admin/post-new.php5.48 ▲0.0478.12 ▼576.16
Media Library /wp-admin/upload.php3.06 ▲0.0627.78 ▲4.68

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 1 new option
New WordPress options
widget_accordion_categories_widget

Browser metrics Passed 4 tests

A check of browser resources used by Accordion Categories
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.03 ▼0.385.95 ▲0.7087.43 ▲8.54
Dashboard /wp-admin2,930 ▲376.02 ▼0.02119.53 ▼14.27165.52 ▼8.66
Posts /wp-admin/edit.php2,740 ▼03.24 ▲0.0266.74 ▼3.92154.13 ▲7.68
Add New Post /wp-admin/post-new.php3,715 ▼2919.11 ▼0.05549.83 ▲96.52185.54 ▲19.11
Media Library /wp-admin/upload.php1,749 ▼35.51 ▲0.03157.98 ▼1.10201.37 ▲3.95

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 detected upon uninstall: 1 option
    • widget_accordion_categories_widget

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
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/accordion-categories/example/category-icon/category-icon.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/category_edit_form_fields.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/common.php
    • > /wp-content/plugins/accordion-categories/class-accordion-categories-widget.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/category_add_form_fields.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/save_field_value.php
    • > /wp-content/plugins/accordion-categories/accordion-categories.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can look at the official readme.txt

accordion-categories/accordion-categories.php Passed 13 tests

The primary PHP file in "Accordion Categories" version 1.2 is used by WordPress to initiate all plugin functionality
105 characters long description:
Accordion Categories is a Wordpress widget that allows you to display categories in the hierachical order

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
No dangerous file extensions were detected805 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP825107294
JavaScript1421278
CSS131699
SVG20282
Markdown130052

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants32
▷ Global constants618.75%
▷ Class constants2681.25%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/arrow-down.png1.44KB1.36KB▼ 5.16%
css/images/arrow-right.png1.10KB1.02KB▼ 7.02%