84% localizejs

Code Review | Localize - Website Translation Integration

WordPress plugin Localize - Website Translation Integration scored84%from 54 tests.

About plugin

  • Plugin page: localizejs
  • Plugin version: 1.2.7
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2015
  • Latest release: Sep 30, 2023
  • Number of updates: 37
  • Update frequency: every 84.5 days
  • Top authors: dereklocalize (54.05%)kgblocalize (45.95%)johnnylocalizejs (5.41%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,128 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.09MB] [CPU: ▼11.91ms] Passed 4 tests

This is a short check of server-side resources used by Localize - Website Translation Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.5522.05 ▼20.61
Dashboard /wp-admin3.42 ▲0.0350.73 ▼12.43
Posts /wp-admin/edit.php3.54 ▲0.1353.93 ▼3.86
Add New Post /wp-admin/post-new.php6.00 ▲0.0799.79 ▼10.74
Media Library /wp-admin/upload.php3.35 ▲0.0740.54 ▲4.06

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Localize - Website Translation Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲21313.87 ▼0.4827.64 ▲25.9344.53 ▲2.03
Dashboard /wp-admin2,260 ▲835.56 ▼0.0284.78 ▼7.8638.63 ▼2.45
Posts /wp-admin/edit.php2,166 ▲631.99 ▼0.0039.46 ▼2.4737.93 ▲1.54
Add New Post /wp-admin/post-new.php1,539 ▲1323.13 ▲0.07672.70 ▲54.5252.72 ▼3.36
Media Library /wp-admin/upload.php1,463 ▲634.20 ▼0.0398.33 ▼5.6142.17 ▼1.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/localizejs/admin/view.php:1

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Localize Wordpress Settings Dashboard) image missing
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

localizejs/localizejs.php Passed 13 tests

The primary PHP file in "Localize - Website Translation Integration" version 1.2.7 is used by WordPress to initiate all plugin functionality
51 characters long description:
Easily integrate Localize into your WordPress site.

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
Everything looks great! No dangerous files found in this plugin544 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP613350386
JavaScript1559158

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods660.00%
▷ Protected methods00.00%
▷ Private methods440.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected