78% acme-wpml-language-switch

Code Review | ACME WPML Language Switch

WordPress plugin ACME WPML Language Switch scored 78% 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: 6.3.1
  • 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,441 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.50ms] Passed 4 tests

An overview of 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.50 ▲0.0438.97 ▼1.37
Dashboard /wp-admin3.34 ▲0.0447.64 ▼0.98
Posts /wp-admin/edit.php3.39 ▲0.0445.07 ▼5.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.66 ▼14.20
Media Library /wp-admin/upload.php3.26 ▲0.0438.63 ▲4.76
Language Switch /wp-admin/admin.php?page=acme-wpml-language-switch3.3131.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACME WPML Language Switch
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.35 ▼1.004.45 ▲2.6043.11 ▼10.95
Dashboard /wp-admin2,225 ▲374.86 ▼0.0398.59 ▼3.9241.61 ▼2.24
Posts /wp-admin/edit.php2,108 ▲191.97 ▼0.0533.84 ▼4.1434.48 ▲1.59
Add New Post /wp-admin/post-new.php1,530 ▼317.56 ▼5.48677.45 ▲25.4249.67 ▼3.00
Media Library /wp-admin/upload.php1,407 ▲164.25 ▲0.05108.34 ▲10.6952.01 ▲6.42
Language Switch /wp-admin/admin.php?page=acme-wpml-language-switch7892.0624.8625.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/acme-wpml-language-switch/public/partials/acme-wpml-language-switch-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > 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
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === acme-wpml-language-switch === )
The official readme.txt might help

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

The entry point to "ACME WPML Language Switch" version 1.1.1 is a PHP file that has certain tags in its header comment area
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 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin514 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12168603380
PO File24256128
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin