83% 012-ps-multi-languages

Code Review | 012 Ps Multi Languages

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

About plugin

  • Plugin page: 012-ps-multi-lang...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.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

100+ active / 33,070 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by 012 Ps Multi Languages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.13 ▼5.38
Dashboard /wp-admin3.31 ▲0.0143.95 ▼5.80
Posts /wp-admin/edit.php3.36 ▲0.0046.05 ▲4.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.14 ▼7.51
Media Library /wp-admin/upload.php3.23 ▲0.0036.75 ▲2.67

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 305 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

012 Ps Multi Languages: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7813.24 ▼1.161.52 ▼0.3930.63 ▼13.29
Dashboard /wp-admin2,219 ▲274.89 ▼0.1197.22 ▼15.3553.94 ▲8.20
Posts /wp-admin/edit.php2,101 ▲151.98 ▼0.0339.75 ▲4.1051.45 ▲14.89
Add New Post /wp-admin/post-new.php1,550 ▲2023.40 ▲0.26665.00 ▲24.1658.52 ▼11.99
Media Library /wp-admin/upload.php1,401 ▲164.23 ▼0.06100.42 ▲0.9153.89 ▲11.69

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > 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/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 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 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
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (category list.), #2 (add category.), #3 (post list.), #4 (edit post edit page edit custom post.)
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

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

The main PHP script in "012 Ps Multi Languages" version 1.6 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same 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 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,455 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP63739111,197
JavaScript31419130
CSS2106128

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.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
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods79
▷ Static methods00.00%
▷ Public methods79100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
288 PNG files occupy 0.41MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flags/mw.png0.30KB0.27KB▼ 11.29%
flags/mk.png0.42KB0.34KB▼ 17.33%
flags/lv.png0.29KB0.24KB▼ 17.97%
flags/tt.png0.44KB0.40KB▼ 9.69%
flags/ai.alt.png0.37KB0.29KB▼ 19.52%