84% wp-simple-menu-icons

Code Review | WP Simple Menu Icons

WordPress plugin WP Simple Menu Icons scored84%from 54 tests.

About plugin

  • Plugin page: wp-simple-menu-icons
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.6
  • WordPress version: 6.3.1
  • First release: Dec 31, 2020
  • Latest release: Dec 31, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: alessandro.tesoro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼1.49ms] Passed 4 tests

Analyzing server-side resources used by WP Simple Menu Icons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2940.89 ▼5.83
Dashboard /wp-admin3.59 ▲0.2846.39 ▼5.69
Posts /wp-admin/edit.php3.64 ▲0.2848.82 ▼0.31
Add New Post /wp-admin/post-new.php6.11 ▲0.2296.37 ▲8.24
Media Library /wp-admin/upload.php3.47 ▲0.2440.97 ▲5.88

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Simple Menu Icons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.35 ▼1.294.41 ▲2.5936.87 ▼9.97
Dashboard /wp-admin2,209 ▲214.86 ▼0.00105.75 ▼11.0739.14 ▼5.26
Posts /wp-admin/edit.php2,086 ▼62.05 ▼0.0034.24 ▼3.8935.90 ▼0.40
Add New Post /wp-admin/post-new.php1,542 ▲2818.42 ▲0.91626.82 ▼64.7672.46 ▲10.34
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.05101.66 ▼5.2942.37 ▼3.03

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Pressmodo\\Requirements\\Abstracts\\Checker' not found in wp-content/plugins/wp-simple-menu-icons/vendor/pressmodo/wp-requirements/src/Checker/Theme.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Pressmodo\\Requirements\\Abstracts\\Checker' not found in wp-content/plugins/wp-simple-menu-icons/vendor/pressmodo/wp-requirements/src/Checker/PHPExtensions.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Pressmodo\\Requirements\\Abstracts\\Checker' not found in wp-content/plugins/wp-simple-menu-icons/vendor/pressmodo/wp-requirements/src/Checker/WordPress.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/wp-simple-menu-icons/vendor/symfony/yaml/Exception/ParseException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/wp-simple-menu-icons/vendor/symfony/yaml/Command/LintCommand.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-simple-menu-icons/vendor/symfony/yaml/Exception/RuntimeException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Pressmodo\\Requirements\\Abstracts\\Checker' not found in wp-content/plugins/wp-simple-menu-icons/vendor/pressmodo/wp-requirements/src/Checker/PHP.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/wp-simple-menu-icons/vendor/symfony/yaml/Exception/DumpException.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Pressmodo\\Requirements\\Interfaces\\Checkable' not found in wp-content/plugins/wp-simple-menu-icons/vendor/pressmodo/wp-requirements/src/Abstracts/Checker.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Pressmodo\\Requirements\\Abstracts\\Checker' not found in wp-content/plugins/wp-simple-menu-icons/vendor/pressmodo/wp-requirements/src/Checker/Plugins.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
5 plugin tags: menu, pressmodo, fontawesome, sematico, icons

wp-simple-menu-icons/wp-simple-menu-icons.php Passed 13 tests

"WP Simple Menu Icons" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
An easy way to add icons to your navigation menus.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin35,294 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
YAML10021,782
SVG3009,546
PHP429741,5933,513
JSON100449
CSS3043
JavaScript1001

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 128)
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity28.43
▷ Minimum class complexity1.00
▷ Maximum class complexity297.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity128.00
Code structure
Namespaces12
Interfaces2
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes28.00%
Methods174
▷ Static methods5531.61%
▷ Public methods11767.24%
▷ Protected methods21.15%
▷ Private methods5531.61%
Functions24
▷ Named functions1666.67%
▷ Anonymous functions833.33%
Constants23
▷ Global constants626.09%
▷ Class constants1773.91%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin