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: 6.3.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

80+ active / 2,257 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.27ms] Passed 4 tests

An overview of server-side resources used by Accordion Categories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.88 ▼1.41
Dashboard /wp-admin3.36 ▲0.0646.78 ▼0.74
Posts /wp-admin/edit.php3.41 ▲0.0649.62 ▼1.46
Add New Post /wp-admin/post-new.php5.94 ▲0.0684.84 ▼17.47
Media Library /wp-admin/upload.php3.28 ▲0.0637.04 ▲4.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_accordion_categories_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Accordion Categories: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.66 ▼0.701.73 ▲0.1340.95 ▲0.93
Dashboard /wp-admin2,206 ▲155.91 ▲1.02102.96 ▼12.9541.28 ▼2.89
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0739.08 ▼2.3636.30 ▼1.16
Add New Post /wp-admin/post-new.php1,549 ▲1623.09 ▼0.09668.04 ▲38.4466.31 ▲15.12
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0596.82 ▼8.0842.14 ▼2.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_accordion_categories_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 fix the following items
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/accordion-categories/example/category-icon/common.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/category-icon.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/save_field_value.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/category_add_form_fields.php
    • > /wp-content/plugins/accordion-categories/accordion-categories.php
    • > /wp-content/plugins/accordion-categories/example/category-icon/category_edit_form_fields.php
    • > /wp-content/plugins/accordion-categories/class-accordion-categories-widget.php

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
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 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions 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
There were no cyclomatic complexity issued detected
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/arrow-right.png1.10KB1.02KB▼ 7.02%
css/images/arrow-down.png1.44KB1.36KB▼ 5.16%