94% wpml-editor-languages

Code Review | WPML Editor Languages

WordPress plugin WPML Editor Languages scored 94% from 54 tests.

About plugin

  • Plugin page: wpml-editor-langu...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.3
  • WordPress version: 5.8.1
  • First release: May 21, 2015
  • Latest release: Nov 7, 2017
  • Number of updates: 30
  • Update frequency: every 30.1 days
  • Top authors: ozthegreat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 3,648 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼163.52ms] Passed 4 tests

This is a short check of server-side resources used by WPML Editor Languages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.0038.06 ▼0.39
Dashboard /wp-admin3.06 ▲0.0045.42 ▼44.11
Posts /wp-admin/edit.php3.11 ▲0.0041.41 ▼29.50
Add New Post /wp-admin/post-new.php5.42 ▼0.0289.44 ▼580.07
Media Library /wp-admin/upload.php3.00 ▲0.0038.15 ▲4.57

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WPML Editor Languages
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲10615.78 ▼0.107.42 ▼1.3651.80 ▲0.98
Dashboard /wp-admin2,989 ▲585.91 ▲0.02141.67 ▼72.19109.29 ▼46.89
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0167.22 ▼15.5291.09 ▼42.01
Add New Post /wp-admin/post-new.php1,615 ▼6821.43 ▲2.96291.30 ▼120.50117.40 ▼2.14
Media Library /wp-admin/upload.php1,807 ▲565.02 ▲0.01158.64 ▲8.00121.50 ▲5.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpml-editor-languages/admin/partials/wpml-editor-languages-user-languages-select.php:17

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: admin, wpml, i18n, languages, multilingual

wpml-editor-languages/wpml-editor-languages.php 92% from 13 tests

The main PHP script in "WPML Editor Languages" version 1.0.7 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin300 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9127495300

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods620.69%
▷ Public methods2586.21%
▷ Protected methods00.00%
▷ Private methods413.79%
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
There were not PNG files found in your plugin