47% mobile-menu-ck

Code Review | Mobile Menu CK

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

About plugin

  • Plugin page: mobile-menu-ck
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Nov 21, 2018
  • Latest release: Jan 24, 2019
  • Number of updates: 5
  • Update frequency: every 12.8 days
  • Top authors: ced1870 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 748 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▲2.20ms] Passed 4 tests

This is a short check of server-side resources used by Mobile Menu CK
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1548.77 ▲5.93
Dashboard /wp-admin3.48 ▲0.1659.28 ▲8.64
Posts /wp-admin/edit.php3.57 ▲0.2154.17 ▼0.33
Add New Post /wp-admin/post-new.php6.01 ▲0.1297.18 ▲3.76
Media Library /wp-admin/upload.php3.35 ▲0.1239.79 ▼0.56
Add new menu /wp-admin/admin.php?page=mobilemenuck_edit_menu3.5644.02
All menus /wp-admin/admin.php?page=mobilemenuck_general3.5639.35
All styles /wp-admin/admin.php?page=mobilemenuck_styles3.5639.46
Add new style /wp-admin/admin.php?page=mobilemenuck_edit_style3.5639.15

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 397 new files
Database: 2 new tables, 6 new options
New tables
wp_mobilemenuck_styles
wp_mobilemenuck_menus
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mobile Menu CK
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲18215.06 ▲1.481.84 ▲0.0341.75 ▼5.44
Dashboard /wp-admin2,362 ▲1566.43 ▲0.51140.69 ▲29.2486.56 ▲43.82
Posts /wp-admin/edit.php2,286 ▲1943.36 ▲1.3346.41 ▲5.9370.26 ▲29.44
Add New Post /wp-admin/post-new.php1,535 ▼222.59 ▼0.55598.03 ▼121.2729.50 ▼33.72
Media Library /wp-admin/upload.php1,425 ▲374.17 ▼0.0479.63 ▼26.7685.18 ▲39.67
Add new menu /wp-admin/admin.php?page=mobilemenuck_edit_menu1,2593.2750.9379.13
All menus /wp-admin/admin.php?page=mobilemenuck_general1,1983.1344.1585.73
All styles /wp-admin/admin.php?page=mobilemenuck_styles1,0313.1238.8462.90
Add new style /wp-admin/admin.php?page=mobilemenuck_edit_style1,0313.1742.2764.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_mobilemenuck_styles
    • wp_mobilemenuck_menus
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mobilemenuck_edit_style
    • > Deprecated in wp-content/plugins/mobile-menu-ck/helpers/ckpath.php+150
    Array and string offset access syntax with curly braces is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mobile-menu-ck/views/about/view.html.php
    • > /wp-content/plugins/mobile-menu-ck/views/style/tmpl/default_mainmenu.php
    • > /wp-content/plugins/mobile-menu-ck/interfaces/stylescss.php
    • > /wp-content/plugins/mobile-menu-ck/interfaces/itemsselection.php
    • > /wp-content/plugins/mobile-menu-ck/views/about/tmpl/default.php
    • > /wp-content/plugins/mobile-menu-ck/interfaces/columnsmanager.php
    • > /wp-content/plugins/mobile-menu-ck/interfaces/rendercss.php
    • > /wp-content/plugins/mobile-menu-ck/interfaces/loaditemoptions.php
    • > /wp-content/plugins/mobile-menu-ck/interfaces/_loaditem.php
    • > /wp-content/plugins/mobile-menu-ck/interfaces/loaditem.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Mobilemenuck\\CKListTable' not found in wp-content/plugins/mobile-menu-ck/helpers/cklisttablemenu.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Mobilemenuck\\CKListTable' not found in wp-content/plugins/mobile-menu-ck/helpers/cklisttablestyle.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=mobilemenuck_edit_menu
    • > Network (severe)
    wp-content/plugins/mobile-menu-ck/assets/fields/radio.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=mobilemenuck_edit_menu
    • > Network (severe)
    wp-content/plugins/mobile-menu-ck/assets/fields/color.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=mobilemenuck_edit_menu
    • > Network (severe)
    wp-content/plugins/mobile-menu-ck/assets/fields/media.js?ver=6.3.1 - 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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: addons, menu, plugins, mobile

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

The main file in "Mobile Menu CK" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
Mobile Menu CK is the perfect solution to create your mobile menus.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Please 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/mobile-menu-ck/assets/jscolor/Demos of JSColor.URL
16,280 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
PHP592,5603,7548,639
SVG1002,671
JavaScript32331631,801
PO File11,1372,3021,760
CSS12189801,396
JSON110011
HTML2002

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 272)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity32.93
▷ Minimum class complexity1.00
▷ Maximum class complexity339.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity272.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes42
▷ Abstract classes12.38%
▷ Concrete classes4197.62%
▷ Final classes00.00%
Methods409
▷ Static methods10826.41%
▷ Public methods36889.98%
▷ Protected methods276.60%
▷ Private methods143.42%
Functions13
▷ Named functions969.23%
▷ Anonymous functions430.77%
Constants50
▷ Global constants4182.00%
▷ Class constants918.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
265 compressed PNG files occupy 0.23MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/file_audio.png0.64KB0.68KB0.00%
images/fondheader.png0.20KB0.37KB0.00%
presets/prototype/preview.png4.79KB2.53KB▼ 47.19%
images/interface/layout-select.png0.39KB0.43KB0.00%
images/plus.png0.45KB0.44KB▼ 1.96%