84% native-gettext

Code Review | Native Gettext for Wordpress

WordPress plugin Native Gettext for Wordpress scored 84% from 54 tests.

About plugin

  • Plugin page: native-gettext
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2022
  • Latest release: Sep 22, 2023
  • Number of updates: 23
  • Update frequency: every 25.0 days
  • Top authors: colinleroy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Native Gettext for Wordpress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.82 ▼4.01
Dashboard /wp-admin3.35 ▲0.0545.73 ▼3.89
Posts /wp-admin/edit.php3.46 ▲0.1147.62 ▼0.61
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.33 ▼11.21
Media Library /wp-admin/upload.php3.27 ▲0.0534.88 ▲2.60

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Native Gettext for Wordpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.151.64 ▲0.0341.20 ▲1.14
Dashboard /wp-admin2,206 ▲215.85 ▲0.95107.53 ▲2.3144.03 ▲2.07
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.1241.76 ▲2.4936.29 ▲5.03
Add New Post /wp-admin/post-new.php1,535 ▲2123.41 ▲5.67675.66 ▲27.2259.20 ▼3.04
Media Library /wp-admin/upload.php1,391 ▲94.31 ▲0.1695.57 ▼6.1042.38 ▼3.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext_Translations' not found in wp-content/plugins/native-gettext/classes/class-native-mo.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext_Translations' not found in wp-content/plugins/native-gettext/classes/class-native-mo.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext_Translations' not found in wp-content/plugins/native-gettext/classes/class-native-mo.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: translation, gettext, performance

native-gettext/native-gettext.php Passed 13 tests

The main PHP script in "Native Gettext for Wordpress" version 1.1.3 is automatically included on every request by WordPress
40 characters long description:
A minimal native gettext implementation.

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity17.33
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin