84% falang-for-yootheme-lite

Code Review | Falang for YOOtheme Lite

WordPress plugin Falang for YOOtheme Lite scored84%from 54 tests.

About plugin

  • Plugin page: falang-for-yoothe...
  • Plugin version: 1.12
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Oct 22, 2021
  • Latest release: Oct 27, 2023
  • Number of updates: 26
  • Update frequency: every 28.3 days
  • Top authors: sbouey (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

70+ active /2,091 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲1.59ms] Passed 4 tests

An overview of server-side resources used by Falang for YOOtheme Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.26 ▲1.72
Dashboard /wp-admin3.36 ▲0.0544.69 ▼0.81
Posts /wp-admin/edit.php3.47 ▲0.1147.90 ▲3.15
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.49 ▲3.58
Media Library /wp-admin/upload.php3.28 ▲0.0536.12 ▲2.28

Server storage [IO: ▲0.04MB] [DB: ▲0.82MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Falang for YOOtheme Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.31 ▼0.281.67 ▼0.6043.02 ▲5.16
Dashboard /wp-admin2,203 ▲455.52 ▼0.0485.74 ▼6.9238.67 ▼0.65
Posts /wp-admin/edit.php2,108 ▲82.13 ▲0.1239.62 ▼0.2536.14 ▼1.16
Add New Post /wp-admin/post-new.php1,545 ▲818.44 ▲0.38647.85 ▲67.9175.61 ▲13.52
Media Library /wp-admin/upload.php1,408 ▲144.23 ▲0.05109.61 ▲11.9747.46 ▲3.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.82MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/falang-for-yootheme-lite/falang-for-yootheme-lite.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "www.faboba.com/falangw/"
You can take inspiration from this readme.txt

falang-for-yootheme-lite/falang-for-yootheme-lite.php Passed 13 tests

"Falang for YOOtheme Lite" version 1.12's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
43 characters long description:
Manage translation for YOOtteme with Falang

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 detected677 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP4162269554
JSON1000120
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity34.00
▷ Minimum class complexity20.00
▷ Maximum class complexity42.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods513.51%
▷ Public methods2978.38%
▷ Protected methods38.11%
▷ Private methods513.51%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants337.50%
▷ Class constants562.50%
▷ Public constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon-80x80.png4.70KB2.52KB▼ 46.35%