10% language-code-selector-mqtranslate

Code Review | mqtranslate langcode widget selector

WordPress plugin mqtranslate langcode widget selector scored10%from 54 tests.

About plugin

  • Plugin page: language-code-sel...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Dec 24, 2014
  • Latest release: Apr 30, 2015
  • Number of updates: 6
  • Update frequency: every 21.5 days
  • Top authors: rufein (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /4,037 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/language-code-selector-mqtranslate/mqtranslate_langcode_selector.php+74
    Methods with the same name as their class will not be constructors in a future version of PHP; mqTranslateLangCodeWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼54.29ms] Passed 4 tests

This is a short check of server-side resources used by mqtranslate langcode widget selector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.393.86 ▼31.02
Dashboard /wp-admin2.09 ▼1.216.40 ▼45.06
Posts /wp-admin/edit.php2.09 ▼1.267.24 ▼44.15
Add New Post /wp-admin/post-new.php2.09 ▼3.795.87 ▼95.62
Media Library /wp-admin/upload.php2.09 ▼1.135.60 ▼32.33

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_mqtranslate_langcode_selector
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by mqtranslate langcode widget selector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.65 ▼0.661.93 ▲0.0439.28 ▼5.91
Dashboard /wp-admin2,206 ▲154.87 ▼1.03108.48 ▲3.7844.10 ▲2.37
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.1039.34 ▼4.6038.55 ▼2.87
Add New Post /wp-admin/post-new.php1,533 ▼023.40 ▲0.37634.46 ▲24.2159.01 ▲5.95
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0995.85 ▼3.7741.68 ▼1.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/language-code-selector-mqtranslate/mqtranslate_langcode_selector.php+74
    Methods with the same name as their class will not be constructors in a future version of PHP; mqTranslateLangCodeWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_mqtranslate_langcode_selector
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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× 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/language-code-selector-mqtranslate/mqtranslate_langcode_selector.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === language-code-selector-mqtranslate === )
You can look at the official readme.txt

language-code-selector-mqtranslate/mqtranslate_langcode_selector.php 92% from 13 tests

"mqtranslate langcode widget selector" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("language-code-selector-mqtranslate.php" instead of "mqtranslate_langcode_selector.php")

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
Good job! No executable or dangerous file extensions detected69 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162669

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin