83% itstart-smart-menu

Code Review | ITStart Smart Menu

WordPress plugin ITStart Smart Menu scored83%from 54 tests.

About plugin

  • Plugin page: itstart-smart-menu
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2023
  • Latest release: Feb 16, 2023
  • Number of updates: 5
  • Update frequency: every 6.0 days
  • Top authors: itstarteu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /133 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.69ms] Passed 4 tests

An overview of server-side resources used by ITStart Smart Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.07 ▼2.87
Dashboard /wp-admin3.37 ▲0.0649.98 ▼0.05
Posts /wp-admin/edit.php3.48 ▲0.1245.94 ▼2.20
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.44 ▼1.64
Media Library /wp-admin/upload.php3.29 ▲0.0635.83 ▲0.13

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

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

Browser metrics Passed 4 tests

ITStart Smart Menu: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10914.39 ▼0.062.02 ▲0.0540.57 ▼8.17
Dashboard /wp-admin2,229 ▲525.75 ▲0.1883.27 ▼15.4141.92 ▲1.23
Posts /wp-admin/edit.php2,139 ▲602.29 ▲0.2836.32 ▲0.7833.41 ▼0.86
Add New Post /wp-admin/post-new.php1,555 ▲2923.22 ▲0.01624.01 ▲4.9732.43 ▼23.70
Media Library /wp-admin/upload.php1,434 ▲344.34 ▲0.01110.52 ▲8.1245.55 ▲1.44

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/itstart-smart-menu/itstart_smart_menu.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === itstart-smart-menu === )
Please take inspiration from this readme.txt

itstart-smart-menu/itstart_smart_menu.php 85% from 13 tests

Analyzing the main PHP file in "ITStart Smart Menu" version 1.0
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 183 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("itstart-smart-menu.php" instead of "itstart_smart_menu.php")

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
Good job! No executable or dangerous file extensions detected492 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP12023294
PO File36669193
JavaScript1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
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 methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected