84% nifty-menu-options

Code Review | Material UI Menu Icons - Nifty Menu Options

WordPress plugin Material UI Menu Icons - Nifty Menu Options scored84%from 54 tests.

About plugin

  • Plugin page: nifty-menu-options
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2018
  • Latest release: Sep 20, 2020
  • Number of updates: 8
  • Update frequency: every 103.8 days
  • Top authors: dunhakdis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /15,847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼1.86ms] Passed 4 tests

Analyzing server-side resources used by Material UI Menu Icons - Nifty Menu Options
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5047.96 ▲0.10
Dashboard /wp-admin3.82 ▲0.5154.96 ▲1.52
Posts /wp-admin/edit.php3.87 ▲0.5158.40 ▲3.66
Add New Post /wp-admin/post-new.php6.33 ▲0.45103.97 ▼7.71
Media Library /wp-admin/upload.php3.68 ▲0.4541.89 ▼1.36

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Material UI Menu Icons - Nifty Menu Options
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.411.85 ▲0.1140.17 ▼1.40
Dashboard /wp-admin2,189 ▲155.59 ▲0.0696.60 ▲4.1459.73 ▲20.93
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0239.13 ▼0.2834.44 ▼1.64
Add New Post /wp-admin/post-new.php1,531 ▲522.98 ▲0.01614.63 ▼38.4258.01 ▲4.22
Media Library /wp-admin/upload.php1,397 ▼04.32 ▲0.11106.42 ▼7.9845.03 ▼6.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(NIFTY_MENU_OPTION_TRAIL_PATHsrc/resources/class-menuiconpicker.php): failed to open stream: No such file or directory in wp-content/plugins/nifty-menu-options/src/classes/class-admin.php on line 23
    • > PHP Fatal error
      require_once(): Failed opening required 'NIFTY_MENU_OPTION_TRAIL_PATHsrc/resources/class-menuiconpicker.php' (include_path='.:/usr/share/php') in wp-content/plugins/nifty-menu-options/src/classes/class-admin.php on line 23
    • > PHP Warning
      require_once(NIFTY_MENU_OPTION_TRAIL_PATHsrc/template/icon-library.php): failed to open stream: No such file or directory in wp-content/plugins/nifty-menu-options/src/resources/class-menuiconpicker.php on line 23
    • > PHP Warning
      Use of undefined constant NIFTY_MENU_OPTION_TRAIL_PATH - assumed 'NIFTY_MENU_OPTION_TRAIL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nifty-menu-options/src/classes/class-admin.php on line 23
    • > PHP Fatal error
      require_once(): Failed opening required 'NIFTY_MENU_OPTION_TRAIL_PATHsrc/template/icon-library.php' (include_path='.:/usr/share/php') in wp-content/plugins/nifty-menu-options/src/resources/class-menuiconpicker.php on line 23
    • > PHP Warning
      Use of undefined constant NIFTY_MENU_OPTION_TRAIL_PATH - assumed 'NIFTY_MENU_OPTION_TRAIL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/nifty-menu-options/src/resources/class-menuiconpicker.php on line 23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: nav menu, navigation, menu icons, menu, icons

nifty-menu-options/nifty-menu-options.php 92% from 13 tests

The main PHP script in "Material UI Menu Icons - Nifty Menu Options" version 1.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
There were no executable files found in this plugin3,586 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP163631,3782,592
Sass7128395
CSS35913373
JavaScript23639183
Markdown321034
JSON1009

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.34
Average class complexity13.15
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes969.23%
Methods73
▷ Static methods4156.16%
▷ Public methods6690.41%
▷ Protected methods11.37%
▷ Private methods68.22%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin