93% 012-ps-multi-languages

Code Review | 012 Ps Multi Languages

WordPress plugin 012 Ps Multi Languages scored 93% from 54 tests.

About plugin

  • Plugin page: 012-ps-multi-lang...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jun 15, 2012
  • Latest release: Dec 31, 2012
  • Number of updates: 48
  • Update frequency: every 4.2 days
  • Top authors: ouhinit (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active / 30,330 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by 012 Ps Multi Languages
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0026.22 ▲1.12
Dashboard /wp-admin3.06 ▼0.0040.35 ▼0.96
Posts /wp-admin/edit.php3.11 ▲0.0133.43 ▼7.99
Add New Post /wp-admin/post-new.php5.43 ▼0.0177.84 ▼572.81
Media Library /wp-admin/upload.php3.01 ▼0.0024.08 ▼8.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 305 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

012 Ps Multi Languages: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,735 ▲13415.61 ▼0.015.48 ▲0.5371.47 ▼7.23
Dashboard /wp-admin2,946 ▲476.12 ▼0.16114.92 ▼11.72207.95 ▲40.18
Posts /wp-admin/edit.php2,756 ▲163.24 ▲0.0165.29 ▼0.09182.25 ▲42.57
Add New Post /wp-admin/post-new.php3,747 ▲1218.74 ▲1.00425.63 ▼18.06162.77 ▼1.83
Media Library /wp-admin/upload.php1,765 ▲165.55 ▲0.04142.27 ▲1.84241.86 ▲50.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/012-ps-multi-languages/config/_config.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/012-ps-multi-languages/012-m17n-config/config/_config-$blog_id.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/012-ps-multi-languages/config/_config-$blog_id.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/012-ps-multi-languages/012-m17n-config/config/_config.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/012-ps-multi-languages/ps-multi-languages.php:202
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/012-ps-multi-languages/ps-multi-languages.php on line 117

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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (category list.), #2 (add category.), #3 (post list.), #4 (edit post edit page edit custom post.)
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

012-ps-multi-languages/ps-multi-languages.php 92% from 13 tests

"012 Ps Multi Languages" version 1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("012-ps-multi-languages.php" instead of "ps-multi-languages.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
Everything looks great! No dangerous files found in this plugin1,455 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity80.00
▷ Minimum class complexity28.00
▷ Maximum class complexity164.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods79100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
288 PNG files occupy 0.41MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flags/gh.png0.29KB0.24KB▼ 15.59%
flags/ad.alt.png0.35KB0.31KB▼ 11.02%
flags/mz.png0.40KB0.38KB▼ 5.12%
flags/mc.png0.23KB0.15KB▼ 33.47%
flags/zh-hans.png0.31KB0.25KB▼ 19.17%