83% multi-level-menu-for-ecwid

Code Review | Kinvasoft Multi-level menu for Ecwid

WordPress plugin Kinvasoft Multi-level menu for Ecwid scored83%from 54 tests.

About plugin

  • Plugin page: multi-level-menu-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 6.3.1
  • First release: Apr 19, 2020
  • Latest release: Jun 13, 2021
  • Number of updates: 4
  • Update frequency: every 107.8 days
  • Top authors: kinvasoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /887 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.07MB] [CPU: ▼6.46ms] Passed 4 tests

An overview of server-side resources used by Kinvasoft Multi-level menu for Ecwid
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.49 ▲0.99
Dashboard /wp-admin3.38 ▲0.0447.59 ▼11.28
Posts /wp-admin/edit.php3.50 ▲0.1447.21 ▲3.79
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.87 ▼13.49
Media Library /wp-admin/upload.php3.30 ▲0.0833.41 ▼2.07

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
kinvasoft-multi-level-menu-for-ecwid

Browser metrics Passed 4 tests

A check of browser resources used by Kinvasoft Multi-level menu for Ecwid
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.82 ▲0.431.94 ▲0.0943.76 ▲1.31
Dashboard /wp-admin2,221 ▲304.84 ▼0.0898.83 ▼7.1054.78 ▲13.78
Posts /wp-admin/edit.php2,107 ▲152.02 ▲0.0533.46 ▼1.3844.94 ▲11.35
Add New Post /wp-admin/post-new.php1,541 ▲2123.31 ▲0.07646.42 ▼22.8160.65 ▲4.50
Media Library /wp-admin/upload.php1,403 ▲184.31 ▲0.0997.19 ▼5.1356.55 ▲11.38

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/multi-level-menu-for-ecwid/kinvasoft-multi-level-menu.php on line 20
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/multi-level-menu-for-ecwid/kinvasoft-multi-level-menu.php on line 20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/multi-level-menu-for-ecwid/kinvasoft-multi-level-menu.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Multi-level menu)
Please take inspiration from this readme.txt

multi-level-menu-for-ecwid/kinvasoft-multi-level-menu.php 85% from 13 tests

The primary PHP file in "Kinvasoft Multi-level menu for Ecwid" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("multi-level-menu-for-ecwid.php" instead of "kinvasoft-multi-level-menu.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin492 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP213925394
PO File1192298

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods555.56%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
sample-token.png48.92KB18.32KB▼ 62.54%
icon.png0.44KB0.37KB▼ 15.88%