74% cool-category-menu

Code Review | Cool Category Menu

WordPress plugin Cool Category Menu scored 74% from 54 tests.

About plugin

  • Plugin page: cool-category-menu
  • Plugin version: 1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 27, 2020
  • Latest release: Apr 30, 2020
  • Number of updates: 23
  • Update frequency: every 1.1 days
  • Top authors: natacoimbra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 474 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.75ms] Passed 4 tests

An overview of server-side resources used by Cool Category Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.13 ▼3.83
Dashboard /wp-admin3.34 ▲0.0345.81 ▼3.20
Posts /wp-admin/edit.php3.39 ▲0.0352.43 ▲1.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.77 ▼13.83
Media Library /wp-admin/upload.php3.26 ▲0.0347.85 ▲11.18

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_cssVariables
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cool Category Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.29 ▼1.145.26 ▲3.3837.98 ▼2.30
Dashboard /wp-admin2,216 ▲315.80 ▼0.07101.03 ▼10.9543.25 ▲0.54
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0639.30 ▼0.7535.17 ▼1.36
Add New Post /wp-admin/post-new.php1,527 ▼1517.94 ▼0.43663.39 ▲32.8750.96 ▼5.24
Media Library /wp-admin/upload.php1,398 ▲134.21 ▲0.0496.77 ▼6.1742.03 ▼2.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_cssVariables
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/cool-category-menu/includes/functions.php
    • > /wp-content/plugins/cool-category-menu/includes/style.php
    • > /wp-content/plugins/cool-category-menu/includes/cool-category-menu-page.php
    • > /wp-content/plugins/cool-category-menu/index.php
    • > /wp-content/plugins/cool-category-menu/includes/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: menu, category

cool-category-menu/index.php 92% from 13 tests

The main PHP script in "Cool Category Menu" version 1.9 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cool-category-menu.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,053 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS421159763
PHP510644290

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.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
There are no PNG files in this plugin