78% altra-side-menu

Code Review | Altra Side Menu

WordPress plugin Altra Side Menu scored78%from 54 tests.

About plugin

  • Plugin page: altra-side-menu
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 5, 2019
  • Latest release: Sep 6, 2019
  • Number of updates: 11
  • Update frequency: every 0.3 days
  • Top authors: pulseextensions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by Altra Side Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.20 ▼3.52
Dashboard /wp-admin3.43 ▲0.1346.17 ▼1.14
Posts /wp-admin/edit.php3.48 ▲0.1250.87 ▲2.57
Add New Post /wp-admin/post-new.php6.01 ▲0.1295.04 ▲3.65
Media Library /wp-admin/upload.php3.35 ▲0.1236.81 ▲1.99
Options /wp-admin/admin.php?page=altra_menu_icon_option3.3231.38
Manage Menu /wp-admin/admin.php?page=altra_menu_icon_page3.3232.19
Add Menu /wp-admin/admin.php?page=altra_menu_icon_add3.3536.35

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: 1 new table, 24 new options
New tables
wp_altra_side_menu
New WordPress options
altra-font-weight
can_compress_scripts
altra-keep-data
altra-border-size
altra-width
altra-image-width
altra-border-color
altra-height
widget_recent-posts
altra-menu-bet-box
...

Browser metrics Passed 4 tests

An overview of browser requirements for Altra Side Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21514.31 ▼0.066.16 ▲4.1937.95 ▼1.38
Dashboard /wp-admin2,237 ▲495.90 ▼0.1997.10 ▼11.8172.57 ▲28.45
Posts /wp-admin/edit.php2,127 ▲352.07 ▼0.1038.01 ▼1.1133.89 ▼1.23
Add New Post /wp-admin/post-new.php1,546 ▲2423.35 ▲0.03760.26 ▲124.6036.33 ▼23.45
Media Library /wp-admin/upload.php1,416 ▲314.21 ▼0.02102.33 ▲0.4676.68 ▲31.56
Options /wp-admin/admin.php?page=altra_menu_icon_option1,0901.9325.1827.24
Manage Menu /wp-admin/admin.php?page=altra_menu_icon_page1,1402.1036.9630.05
Add Menu /wp-admin/admin.php?page=altra_menu_icon_add1,0743.1037.2681.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 24 options in the database
    • altra-font-size
    • altra-margin
    • altra-menu-bet-box
    • altra-width
    • altra-border-size
    • db_upgraded
    • altra-bg-color
    • altra-image-width
    • widget_recent-comments
    • widget_theysaidso_widget
    • ...

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/altra-side-menu/altra-side-menu.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=altra_menu_icon_option
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=altra_menu_icon_option 147:1 Uncaught TypeError: $ is not a function
    • > GET request to /wp-admin/admin.php?page=altra_menu_icon_page
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=altra_menu_icon_page 331:5 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: social icon, side menu, icon menu, social media icons, social icons

altra-side-menu/altra-side-menu.php 92% from 13 tests

The main file in "Altra Side Menu" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 308 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin971 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP17014736
CSS2112210
JavaScript13525

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
8 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/edit.png4.75KB2.60KB▼ 45.31%
images/img2.png3.78KB2.34KB▼ 38.04%
images/img3.png3.21KB2.07KB▼ 35.46%
images/settings.png1.46KB1.44KB▼ 1.21%
images/delete.png3.35KB2.22KB▼ 33.61%