88% acme-wpml-language-switch

Code Review | ACME WPML Language Switch

WordPress plugin ACME WPML Language Switch scored 88% from 54 tests.

About plugin

  • Plugin page: acme-wpml-languag...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 5.9.2
  • First release: Oct 15, 2016
  • Latest release: Dec 23, 2016
  • Number of updates: 16
  • Update frequency: every 5.6 days
  • Top authors: acmemediakits (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 2,152 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼290.65ms] Passed 4 tests

Server-side resources used by ACME WPML Language Switch
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1556.39 ▲8.86
Dashboard /wp-admin3.51 ▲0.1034.97 ▲1.45
Posts /wp-admin/edit.php3.73 ▲0.0938.36 ▲2.71
Add New Post /wp-admin/post-new.php6.97 ▼0.0091.09 ▼1,169.85
Media Library /wp-admin/upload.php3.39 ▲0.1025.81 ▲3.08
Language Switch /wp-admin/admin.php?page=acme-wpml-language-switch3.4123.56

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACME WPML Language Switch
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲9715.92 ▼0.076.74 ▲1.352.52 ▼0.16
Dashboard /wp-admin2,909 ▲486.14 ▲0.01122.47 ▼6.92158.32 ▼1.33
Posts /wp-admin/edit.php2,712 ▲183.24 ▲0.0164.83 ▲2.87142.27 ▲3.05
Add New Post /wp-admin/post-new.php1,789 ▲12821.02 ▲4.86441.72 ▲38.35165.74 ▲1.34
Media Library /wp-admin/upload.php1,722 ▲275.50 ▼0.00146.49 ▲10.71190.25 ▲12.29
Language Switch /wp-admin/admin.php?page=acme-wpml-language-switch1,0192.4157.1899.71

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
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/acme-wpml-language-switch/public/partials/acme-wpml-language-switch-public-display.php
  • 1× 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/acme-wpml-language-switch/admin/partials/acme-wpml-language-switch-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === acme-wpml-language-switch === )
Please take inspiration from this readme.txt

acme-wpml-language-switch/acme-wpml-language-switch.php Passed 13 tests

The main PHP file in "ACME WPML Language Switch" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
137 characters long description:
Have Just Two languages WPML website? Replace WMPL default switcher with this very quick menu item. It just displays the translation link

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin514 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PO File24256128

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin