84% language-fallback

Code Review | Language Fallback

WordPress plugin Language Fallback scored84%from 54 tests.

About plugin

  • Plugin page: language-fallback
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 6, 2015
  • Latest release: Sep 24, 2023
  • Number of updates: 27
  • Update frequency: every 110.0 days
  • Top authors: Kau-Boy (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

6,000+ active /32,290 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.61ms] Passed 4 tests

This is a short check of server-side resources used by Language Fallback
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.25 ▼2.70
Dashboard /wp-admin3.34 ▼0.0049.25 ▼11.79
Posts /wp-admin/edit.php3.39 ▲0.0344.76 ▲4.63
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.12 ▼16.50
Media Library /wp-admin/upload.php3.26 ▲0.0334.07 ▲0.57

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Language Fallback
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.461.83 ▲0.1542.59 ▼4.67
Dashboard /wp-admin2,209 ▲185.83 ▼0.1096.02 ▼9.0538.75 ▼5.89
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0533.49 ▼6.8134.62 ▼0.05
Add New Post /wp-admin/post-new.php1,514 ▼2517.70 ▼0.80668.42 ▲62.8452.08 ▲3.76
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0196.06 ▼2.8739.64 ▼1.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/language-fallback/language-fallback.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: l10n, language, english, translation, locale...

language-fallback/language-fallback.php Passed 13 tests

The principal PHP file in "Language Fallback" v. 2.0.0 is loaded by WordPress automatically on each request
103 characters long description:
Set a language as a fallback for the chosen language (e.g. "Deutsch" as a fallback for "Deutsch (Sie)")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected168 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP152120132
XML1154436

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods112.50%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin