78% nlingual

Code Review | nLingual

WordPress plugin nLingual scored78%from 54 tests.

About plugin

  • Plugin page: nlingual
  • Plugin version: 2.9.3
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2013
  • Latest release: Jul 21, 2023
  • Number of updates: 106
  • Update frequency: every 33.8 days
  • Top authors: dougwollison (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /10,556 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
Installer ran successfully

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

Server-side resources used by nLingual
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.61 ▲3.95
Dashboard /wp-admin3.31 ▼0.0443.81 ▼13.89
Posts /wp-admin/edit.php3.36 ▲0.0043.05 ▼2.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.23 ▼18.46
Media Library /wp-admin/upload.php3.23 ▲0.0036.64 ▲2.12

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

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

Browser metrics Passed 4 tests

nLingual: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.351.65 ▼0.0140.66 ▲0.09
Dashboard /wp-admin2,192 ▲145.53 ▼0.0884.01 ▼19.0340.69 ▲0.28
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0138.06 ▲1.2333.73 ▲0.44
Add New Post /wp-admin/post-new.php1,526 ▼022.87 ▼0.11661.98 ▲38.8255.59 ▲2.59
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0494.54 ▼1.4542.40 ▼4.49

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nlingual/uninstall.php
  • 29× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'nLingual\\Handler' not found in wp-content/plugins/nlingual/includes/class-nlingual-localizer.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Locale' not found in wp-content/plugins/nlingual/includes/class-nlingual-locale.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nlingual/documentation/localizables/sidebar.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nlingual/includes/presets-languages.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'nLingual\\Handler' not found in wp-content/plugins/nlingual/includes/class-nlingual-installer.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/nlingual/documentation/post-translation/translation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nlingual/documentation/localizer/localize-this.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'nLingual\\Handler' not found in wp-content/plugins/nlingual/includes/class-nlingual-backend.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nlingual/documentation/synchronizer/cloning.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'nLingual\\Handler' not found in wp-content/plugins/nlingual/includes/class-nlingual-frontend.php:25

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: bilingual, translation, language, multilingual

nlingual/nlingual.php 92% from 13 tests

The main PHP file in "nLingual" ver. 2.9.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected6,471 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP431,6096,3505,349
JSON100518
JavaScript2132130339
Sass2380263
CSS2122

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity38.17
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes24
▷ Abstract classes28.33%
▷ Concrete classes2291.67%
▷ Final classes22100.00%
Methods275
▷ Static methods24488.73%
▷ Public methods24990.55%
▷ Protected methods00.00%
▷ Private methods269.45%
Functions34
▷ Named functions3397.06%
▷ Anonymous functions12.94%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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