78% menu-iconset

Code Review | Menu Iconset

WordPress plugin Menu Iconset scored 78% from 54 tests.

About plugin

  • Plugin page: menu-iconset
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Nov 28, 2019
  • Latest release: Dec 3, 2019
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: anwerashif (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.08ms] Passed 4 tests

This is a short check of server-side resources used by Menu Iconset
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0436.16 ▼4.97
Dashboard /wp-admin3.33 ▲0.0343.65 ▼1.59
Posts /wp-admin/edit.php3.38 ▲0.0245.32 ▼4.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.59 ▼6.94
Media Library /wp-admin/upload.php3.25 ▲0.0233.71 ▼3.57

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Menu Iconset
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.23 ▼1.371.54 ▼1.1738.01 ▼8.66
Dashboard /wp-admin2,206 ▲184.84 ▼0.05108.70 ▼7.0739.05 ▼3.61
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0039.22 ▼0.9034.63 ▼5.31
Add New Post /wp-admin/post-new.php1,542 ▲1418.60 ▼4.58601.77 ▼79.8051.69 ▼5.56
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0694.93 ▼19.8842.32 ▼5.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/menu-iconset/index.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/menu-iconset/includes/mi-cfields.php:11
    • > PHP Warning
      Use of undefined constant miset_lib_path - assumed 'miset_lib_path' (this will throw an Error in a future version of PHP) in wp-content/plugins/menu-iconset/menuiconset.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/menu-iconset/library/walker-nav-menu-edit.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'miset_lib_pathmi-cfields-lib.php' (include_path='.:/usr/share/php') in wp-content/plugins/menu-iconset/menuiconset.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-iconset/library/mi-cfields-lib.php:23
    • > PHP Warning
      require_once(miset_lib_pathmi-cfields-lib.php): failed to open stream: No such file or directory in wp-content/plugins/menu-iconset/menuiconset.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: nav icon, wordpress menu icon, icon image, navigation, menu icon

menu-iconset/index.php 92% from 13 tests

"Menu Iconset" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("menu-iconset.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected140 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP534102115
CSS14625

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods150.00%
▷ Protected methods150.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected