89% wp-responsive-menu

Code Review | WP Responsive Menu

WordPress plugin WP Responsive Menu scored89%from 54 tests.

About plugin

  • Plugin page: wp-responsive-menu
  • Plugin version: 3.1.8
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2014
  • Latest release: Sep 4, 2023
  • Number of updates: 85
  • Update frequency: every 40.9 days
  • Top authors: Magnigenie (58.82%)sagarseth9 (40%)kshirod patel (3.53%)

Code review

54 tests

User reviews

96 reviews

Install metrics

50,000+ active /838,078 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.60MB] [CPU: ▲4.08ms] 75% from 4 tests

This is a short check of server-side resources used by WP Responsive Menu
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,944.51ms on /wp-admin/admin.php?page=wprmenu-demo-import)
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1337.38 ▼0.71
Dashboard /wp-admin4.11 ▲0.8053.79 ▲7.30
Posts /wp-admin/edit.php4.16 ▲0.8052.69 ▲2.99
Add New Post /wp-admin/post-new.php6.63 ▲0.7497.81 ▲6.72
Media Library /wp-admin/upload.php3.97 ▲0.7442.59 ▲9.77
WPR Menu /wp-admin/admin.php?page=wp-responsive-menu4.1368.08
Import Demo /wp-admin/admin.php?page=wprmenu-demo-import4.161,944.51

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 124 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
wpr_optionsframework
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Responsive Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.79 ▲0.421.68 ▲0.1540.04 ▼1.16
Dashboard /wp-admin2,230 ▲395.77 ▲0.90102.67 ▼7.6939.87 ▼3.43
Posts /wp-admin/edit.php2,116 ▲301.97 ▼0.0339.56 ▲1.2435.14 ▼0.31
Add New Post /wp-admin/post-new.php1,564 ▲3118.38 ▼4.93590.46 ▼106.9856.38 ▼5.33
Media Library /wp-admin/upload.php1,418 ▲364.22 ▲0.0497.13 ▼3.9242.11 ▼1.75
WPR Menu /wp-admin/admin.php?page=wp-responsive-menu9,65911.77384.51214.95
Import Demo /wp-admin/admin.php?page=wprmenu-demo-import8692.0226.7127.26

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • wpr_optionsframework
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: Add descriptions for screenshots #13, #14, #0 in wp-responsive-menu/assets to your readme.txt
The official readme.txt might help

wp-responsive-menu/wp-responsive-menu.php 92% from 13 tests

The principal PHP file in "WP Responsive Menu" v. 3.1.8 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin20,966 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript191,7731,0086,913
JSON1006,129
CSS144801894,752
PHP187146242,651
SVG1100521

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity34.14
▷ Minimum class complexity4.00
▷ Maximum class complexity113.00
Average method complexity4.74
▷ Minimum method complexity1.00
▷ Maximum method complexity100.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods62
▷ Static methods1320.97%
▷ Public methods5995.16%
▷ Protected methods00.00%
▷ Private methods34.84%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/assets/images/select_caret_t@2x.png0.21KB0.21KB▼ 1.85%
inc/assets/images/ico-delete.png0.70KB0.72KB0.00%
inc/images/ico-delete.png0.70KB0.72KB0.00%
inc/assets/images/select_caret.png0.17KB0.18KB0.00%
inc/images/check_flat/default.png2.96KB1.57KB▼ 47.12%