94% admin-bar-languages

Code Review | Admin bar languages

WordPress plugin Admin bar languages scored 94% from 54 tests.

About plugin

  • Plugin page: admin-bar-languages
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.8.3
  • WordPress version: 5.9.2
  • First release: Sep 12, 2014
  • Latest release: Nov 10, 2017
  • Number of updates: 8
  • Update frequency: every 144.4 days
  • Top authors: simison (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,857 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼289.96ms] Passed 4 tests

This is a short check of server-side resources used by Admin bar languages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3553.72 ▲5.19
Dashboard /wp-admin3.64 ▲0.2334.36 ▲2.52
Posts /wp-admin/edit.php3.74 ▲0.1038.09 ▲0.44
Add New Post /wp-admin/post-new.php6.98 ▲0.0196.75 ▼1,165.30
Media Library /wp-admin/upload.php3.65 ▲0.3526.27 ▲2.52

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 247 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin bar languages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲4115.95 ▲0.316.48 ▲0.102.64 ▲0.32
Dashboard /wp-admin2,880 ▲196.08 ▼0.08118.69 ▼13.50151.57 ▼7.65
Posts /wp-admin/edit.php2,696 ▲83.03 ▼0.2063.98 ▼6.34142.77 ▼3.71
Add New Post /wp-admin/post-new.php1,753 ▲9220.83 ▲4.67464.52 ▲28.89176.78 ▲29.55
Media Library /wp-admin/upload.php1,700 ▲25.51 ▼0.01146.36 ▲5.66188.98 ▲5.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
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)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/admin-bar-languages/admin-bar-languages.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 97% from 29 tests

readme.txt 94% 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 require attention:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
You can look at the official readme.txt

admin-bar-languages/admin-bar-languages.php Passed 13 tests

The main PHP script in "Admin bar languages" version 1.2 is automatically included on every request by WordPress
67 characters long description:
Show flags for languages at "My sites" list in WordPress admin bar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected94 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.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
242 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flags/BB.png0.27KB0.25KB▼ 5.49%
flags/DK.png0.13KB0.12KB▼ 3.13%
flags/PY.png0.31KB0.31KB▼ 1.55%