84% wpml-flag-in-menu-extended

Code Review | WPML flag in menu Extended

WordPress plugin WPML flag in menu Extended scored84%from 54 tests.

About plugin

  • Plugin page: wpml-flag-in-menu...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2013
  • Latest release: Apr 7, 2016
  • Number of updates: 49
  • Update frequency: every 23.2 days
  • Top authors: jvandemerwe (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /19,139 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by WPML flag in menu Extended
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.51 ▲0.79
Dashboard /wp-admin3.43 ▲0.1243.67 ▼3.22
Posts /wp-admin/edit.php3.51 ▲0.1544.61 ▼4.73
Add New Post /wp-admin/post-new.php6.01 ▲0.1281.35 ▼7.69
Media Library /wp-admin/upload.php3.35 ▲0.1234.78 ▼0.61
WPML Flags in Menu Extended /wp-admin/options-general.php?page=wpml-flag-in-menu-extended3.3231.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
wpml-flag-in-menu-extended_basics
wpml-flag-in-menu-extended_styling
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WPML flag in menu Extended
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.48 ▲0.101.75 ▼0.1444.39 ▲0.03
Dashboard /wp-admin2,209 ▲215.81 ▼0.16100.16 ▼15.3940.34 ▼5.75
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0135.78 ▼0.2235.58 ▼0.10
Add New Post /wp-admin/post-new.php1,536 ▲1521.04 ▼2.32682.65 ▲11.8262.65 ▲0.77
Media Library /wp-admin/upload.php1,394 ▲34.17 ▲0.0193.63 ▼19.3345.40 ▼1.16
WPML Flags in Menu Extended /wp-admin/options-general.php?page=wpml-flag-in-menu-extended9611.8834.6929.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • wpml-flag-in-menu-extended_basics
    • wpml-flag-in-menu-extended_styling
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpml-flag-in-menu-extended/wpml-flag-in-menu-extended.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: nav, languages, wpml, menu, wp_nav_menu...

wpml-flag-in-menu-extended/wpml-flag-in-menu-extended.php Passed 13 tests

The principal PHP file in "WPML flag in menu Extended" v. 1.7 is loaded by WordPress automatically on each request
85 characters long description:
Based on the WPML flag in menu plugin from Ramon Fincken. With menu selection option.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin623 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3133115498
PO File14040113
CSS241312

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.33
▷ Minimum class complexity5.00
▷ Maximum class complexity33.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2890.32%
▷ Protected methods00.00%
▷ Private methods39.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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 files were detected