47% accordeon-menu-ck

Code Review | Accordeon Menu CK

WordPress plugin Accordeon Menu CK scored 47% from 54 tests.

About plugin

  • Plugin page: accordeon-menu-ck
  • Plugin version: 1.1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 5.9.2
  • First release: Dec 8, 2016
  • Latest release: Oct 12, 2020
  • Number of updates: 27
  • Update frequency: every 51.8 days
  • Top authors: ced1870 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 12,688 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼296.26ms] Passed 4 tests

This is a short check of server-side resources used by Accordeon Menu CK
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2452.85 ▲0.63
Dashboard /wp-admin3.60 ▲0.1933.43 ▲0.63
Posts /wp-admin/edit.php3.82 ▲0.1836.62 ▲1.02
Add New Post /wp-admin/post-new.php7.06 ▲0.09101.31 ▼1,186.74
Media Library /wp-admin/upload.php3.47 ▲0.1825.18 ▲0.43
Add New /wp-admin/admin.php?page=accordeonmenuck_edit_style3.6724.86
All Styles /wp-admin/admin.php?page=accordeonmenuck_general3.6723.57

Server storage [IO: ▲1.55MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 71 new files
Database: 1 new table, 1 new option
New tables
wp_accordeonmenuck_styles
New WordPress options
widget_accordeon-menu-ck

Browser metrics Passed 4 tests

A check of browser resources used by Accordeon Menu CK
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,938 ▲18416.44 ▲0.668.96 ▲2.832.18 ▼0.67
Dashboard /wp-admin2,929 ▲685.99 ▼0.21118.01 ▼13.86178.07 ▲13.69
Posts /wp-admin/edit.php2,726 ▲353.13 ▼0.1164.04 ▼0.27138.42 ▼6.66
Add New Post /wp-admin/post-new.php1,656 ▼10419.46 ▼2.73408.90 ▼9.58158.71 ▼3.04
Media Library /wp-admin/upload.php1,732 ▲345.58 ▲0.06126.81 ▼21.12206.94 ▲17.92
Add New /wp-admin/admin.php?page=accordeonmenuck_edit_style5,0405.1192.15181.67
All Styles /wp-admin/admin.php?page=accordeonmenuck_general1,3672.7654.62133.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_accordeonmenuck_styles
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_accordeon-menu-ck

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=accordeonmenuck_general
    • > Deprecated in wp-content/plugins/accordeon-menu-ck/helpers/ckpath.php+151
    Array and string offset access syntax with curly braces is deprecated
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=accordeonmenuck_general
    • > Deprecated in wp-content/plugins/accordeon-menu-ck/helpers/ckstyles.php+397
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
    • > GET request to /wp-admin/admin.php?page=accordeonmenuck_edit_style
    • > POST request to /wp-admin/admin.php?page=accordeonmenuck_edit_style&task=style.ajaxRenderCss&CKTOKEN=fddb2300b2
    • > Notice in wp-content/plugins/accordeon-menu-ck/controllers/style.php+108
    Undefined variable: level12magewidth

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/accordeon-menu-ck/interfaces/rendercss.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ACCORDEONMENUCK_PATH/helpers/walker-nav-menu.php): failed to open stream: No such file or directory in wp-content/plugins/accordeon-menu-ck/helpers/widget.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Accordeonmenuck\\CKListTable' not found in wp-content/plugins/accordeon-menu-ck/helpers/cklisttablestyle.php:20
    • > PHP Fatal error
      require_once(): Failed opening required 'ACCORDEONMENUCK_PATH/helpers/walker-nav-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/accordeon-menu-ck/helpers/widget.php on line 8
    • > PHP Warning
      Use of undefined constant ACCORDEONMENUCK_PATH - assumed 'ACCORDEONMENUCK_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/accordeon-menu-ck/helpers/widget.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=accordeonmenuck_general
    • > Network (severe)
    wp-content/plugins/accordeon-menu-ck/assets/jscolor/jscolor.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: menu, jquery, accordion

accordeon-menu-ck/accordeon-menu-ck.php Passed 13 tests

The principal PHP file in "Accordeon Menu CK" v. 1.1.10 is loaded by WordPress automatically on each request
89 characters long description:
Accordeon Menu CK shows an accordion menu in any sidebar position with multiple settings.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .url - Internet Shortcut in Firefox, IE, Chrome, Safari
      • wp-content/plugins/accordeon-menu-ck/assets/jscolor/Demos of JSColor.URL
11,337 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,1042,4195,364
SVG1002,671
JavaScript62042221,498
CSS4180851,356
PO File1272495446
HTML2002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 277)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity35.04
▷ Minimum class complexity1.00
▷ Maximum class complexity344.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity277.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes27
▷ Abstract classes13.70%
▷ Concrete classes2696.30%
▷ Final classes00.00%
Methods226
▷ Static methods6629.20%
▷ Public methods20088.50%
▷ Protected methods93.98%
▷ Private methods177.52%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants17
▷ Global constants17100.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
8 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/minus.png0.29KB0.29KB▼ 1.33%
images/logo_accordeonmenuck_64.png4.33KB2.98KB▼ 31.12%
images/plus.png0.45KB0.44KB▼ 1.96%
assets/jscolor/hv.png2.80KB7.32KB0.00%
assets/jscolor/hs.png2.62KB7.54KB0.00%