47% accordeon-menu-ck

Code Review | Accordeon Menu CK

WordPress plugin Accordeon Menu CK scored47%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: 6.3.1
  • 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 /13,867 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼7.38ms] Passed 4 tests

An overview of server-side resources used by Accordeon Menu CK
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.05 ▲2.19
Dashboard /wp-admin3.48 ▲0.1850.33 ▼5.78
Posts /wp-admin/edit.php3.60 ▲0.2454.54 ▲4.17
Add New Post /wp-admin/post-new.php6.06 ▲0.1886.93 ▼12.91
Media Library /wp-admin/upload.php3.41 ▲0.1838.71 ▼13.01
All Styles /wp-admin/admin.php?page=accordeonmenuck_general3.6034.43
Add New /wp-admin/admin.php?page=accordeonmenuck_edit_style3.6032.85

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 71 new files
Database: 1 new table, 7 new options
New tables
wp_accordeonmenuck_styles
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_accordeon-menu-ck
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Accordeon Menu CK
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲18714.15 ▼0.225.56 ▲3.7638.38 ▼5.79
Dashboard /wp-admin2,253 ▲505.82 ▼0.10106.20 ▲2.1379.64 ▲37.21
Posts /wp-admin/edit.php2,129 ▲291.97 ▼0.0440.63 ▲1.4837.93 ▲5.96
Add New Post /wp-admin/post-new.php1,704 ▲30021.90 ▲3.57749.41 ▲119.9044.16 ▼1.02
Media Library /wp-admin/upload.php1,429 ▲264.19 ▼0.07102.16 ▼20.0067.07 ▲16.44
All Styles /wp-admin/admin.php?page=accordeonmenuck_general1,0572.0925.4752.06
Add New /wp-admin/admin.php?page=accordeonmenuck_edit_style3,7303.7460.9567.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_accordeonmenuck_styles
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_accordeon-menu-ck
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > 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=2d9890d39c
    • > 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_edit_style
    • > POST request to /wp-admin/admin.php?page=accordeonmenuck_edit_style&task=style.ajaxRenderCss&CKTOKEN=2d9890d39c
    • > 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=2d9890d39c
    • > Notice in wp-content/plugins/accordeon-menu-ck/controllers/style.php+108
    Undefined variable: level12magewidth

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /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 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
    • > 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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=accordeonmenuck_edit_style
    • > 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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: jquery, accordion, menu

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

"Accordeon Menu CK" version 1.1.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 | Executable files are not allowed as they can serve as attack vectors
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in 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

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity has to 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

PNG files should be compressed to save space and minimize bandwidth usage
8 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/jscolor/hv.png2.80KB7.32KB0.00%
images/white_minus_11x12.png0.14KB0.08KB▼ 43.54%
images/admin_menu.png0.42KB0.46KB0.00%
images/white_plus_11x12.png0.21KB0.15KB▼ 29.38%
assets/jscolor/hs.png2.62KB7.54KB0.00%