10% swmenu

Code Review | swMenu

WordPress plugin swMenu scored10%from 54 tests.

About plugin

  • Plugin page: swmenu
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Dec 12, 2013
  • Latest release: Aug 8, 2015
  • Number of updates: 13
  • Update frequency: every 46.5 days
  • Top authors: swmenu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,365 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/swmenu/swmenu.php+64
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼57.58ms] Passed 4 tests

This is a short check of server-side resources used by swMenu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.69 ▼40.70
Dashboard /wp-admin2.05 ▼1.265.67 ▼46.22
Posts /wp-admin/edit.php2.05 ▼1.315.39 ▼47.73
Add New Post /wp-admin/post-new.php2.05 ▼3.845.23 ▼95.67
Media Library /wp-admin/upload.php2.05 ▼1.185.87 ▼27.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_sw_swmenu_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

swMenu: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.82 ▼0.527.62 ▲6.0240.46 ▼5.10
Dashboard /wp-admin2,195 ▲155.61 ▼0.0488.93 ▼0.0936.47 ▼12.57
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0238.24 ▼0.0634.21 ▼4.10
Add New Post /wp-admin/post-new.php1,528 ▼023.32 ▲0.07675.61 ▲18.9453.75 ▲0.11
Media Library /wp-admin/upload.php1,394 ▼64.26 ▲0.10100.08 ▼8.8450.17 ▲3.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/swmenu/swmenu.php+64
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_sw_swmenu_widget
    • widget_recent-posts

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 | 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
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/swmenu/swmenu.php
    • > /wp-content/plugins/swmenu/css/PIE.php
    • > /wp-content/plugins/swmenu/swmenu_widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: menu, css3, widget, responsive

swmenu/swmenu.php Passed 13 tests

The primary PHP file in "swMenu" version 1.2 is used by WordPress to initiate all plugin functionality
53 characters long description:
swMenu widget to display a menu created by swmenu.com

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
Success! There were no dangerous files found in this plugin889 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS300464
PHP310270425

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity8.00
▷ Minimum class complexity5.00
▷ Maximum class complexity12.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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