84% gettext-override-translations

Code Review | Gettext override translations

WordPress plugin Gettext override translations scored 84% from 54 tests.

About plugin

  • Plugin page: gettext-override-...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Aug 5, 2016
  • Latest release: Sep 14, 2022
  • Number of updates: 16
  • Update frequency: every 139.4 days
  • Top authors: ramon fincken (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active / 18,611 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.49ms] Passed 4 tests

A check of server-side resources used by Gettext override translations
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0152.03 ▲8.55
Dashboard /wp-admin3.32 ▲0.0149.29 ▼2.07
Posts /wp-admin/edit.php3.37 ▲0.0151.59 ▼3.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.75 ▼1.33
Media Library /wp-admin/upload.php3.24 ▲0.0139.29 ▲4.77
Gettext override translations /wp-admin/plugins.php?page=gettext-override-translations3.2140.64

Server storage [IO: ▲0.12MB] [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: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gettext override translations
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.19 ▲0.002.09 ▼2.9743.88 ▲3.04
Dashboard /wp-admin2,213 ▲105.85 ▼0.01103.40 ▼5.1439.93 ▼1.98
Posts /wp-admin/edit.php2,090 ▲12.03 ▲0.0235.89 ▼5.0933.37 ▼5.27
Add New Post /wp-admin/post-new.php1,537 ▲323.34 ▲0.35666.76 ▼122.8550.74 ▼12.67
Media Library /wp-admin/upload.php1,389 ▼24.21 ▲0.02104.02 ▲5.1646.44 ▲2.79
Gettext override translations /wp-admin/plugins.php?page=gettext-override-translations9731.8331.3828.20

Uninstaller [IO: ✅] [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
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/gettext-override-translations/gettextoverridetranslations.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Default view), #2 (Override "Save Changes" text with "Store right away"), #3 (WooCommerce "Select option" (dropdown value) setting), #4 (WooCommerce "Select option" (dropdown value) translation result), #5 (WooCommerce "Order notes" setting), #6 (WooCommerce "Order notes" translation result)
You can take inspiration from this readme.txt

gettext-override-translations/gettextoverridetranslations.php 92% from 13 tests

This is the main PHP file of "Gettext override translations" version 2.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gettext-override-translations.php" instead of "gettextoverridetranslations.php")

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 detected243 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32421189
JavaScript113036
CSS15018

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity16.00
▷ Minimum class complexity4.00
▷ Maximum class complexity28.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png40.95KB18.01KB▼ 56.01%
screenshot-4.png9.19KB3.62KB▼ 60.64%
screenshot-3.png3.55KB2.33KB▼ 34.47%
img/delete.png0.86KB0.86KB0.00%
screenshot-5.png7.32KB3.86KB▼ 47.35%