84% icon4menu

Code Review | Icon4Menu

WordPress plugin Icon4Menu scored 84% from 54 tests.

About plugin

  • Plugin page: icon4menu
  • Plugin version: 0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2019
  • Latest release: Mar 7, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mfatihinanc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,620 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.35ms] Passed 4 tests

An overview of server-side resources used by Icon4Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.03 ▼2.48
Dashboard /wp-admin3.31 ▲0.0144.51 ▲0.70
Posts /wp-admin/edit.php3.36 ▲0.0145.40 ▲1.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.18 ▼11.65
Media Library /wp-admin/upload.php3.23 ▲0.0135.21 ▲0.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 518 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Icon4Menu: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.29 ▼1.101.98 ▲0.2939.51 ▼8.85
Dashboard /wp-admin2,203 ▲125.85 ▲0.9496.35 ▼5.4436.74 ▼3.39
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0137.26 ▼1.0136.52 ▼0.70
Add New Post /wp-admin/post-new.php1,534 ▲2023.43 ▲5.91658.63 ▲8.6952.23 ▼4.11
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0496.81 ▼12.7441.46 ▼4.70

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/icon4menu/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Sample appereance of icon4menu on wordpress menu.) image required
The official readme.txt is a good inspiration

icon4menu/index.php 92% from 13 tests

Analyzing the main PHP file in "Icon4Menu" version 0.2
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("icon4menu.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin35,079 lines of code in 517 files:
LanguageFilesBlank linesComment linesLines of code
SVG5140035,050
PHP12816
JavaScript11012
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin