10% lingo

Code Review | Lingo

WordPress plugin Lingo scored10%from 54 tests.

About plugin

  • Plugin page: lingo
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2015
  • Latest release: Apr 27, 2015
  • Number of updates: 7
  • Update frequency: every 2.1 days
  • Top authors: mindrun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /851 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/lingo/main.php+427
    Undefined index: HTTP_ACCEPT_LANGUAGE

Server metrics [RAM: ▼1.17MB] [CPU: ▼45.14ms] Passed 4 tests

Analyzing server-side resources used by Lingo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6413.81 ▼23.21
Dashboard /wp-admin2.86 ▼0.4916.47 ▼40.21
Posts /wp-admin/edit.php2.86 ▼0.5017.09 ▼33.10
Add New Post /wp-admin/post-new.php2.86 ▼3.0317.62 ▼84.05
Media Library /wp-admin/upload.php2.86 ▼0.3718.88 ▼14.96
Translations /wp-admin/edit.php?post_type=translation2.8617.42
Add New /wp-admin/post-new.php?post_type=translation2.8616.51

Server storage [IO: ▲0.02MB] [DB: ▲0.05MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lingo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.60 ▼0.941.78 ▲0.1641.89 ▼2.26
Dashboard /wp-admin2,230 ▲455.90 ▲1.02101.41 ▼3.7440.06 ▼5.37
Posts /wp-admin/edit.php2,117 ▲252.02 ▼0.0133.56 ▼6.7733.05 ▼3.41
Add New Post /wp-admin/post-new.php1,553 ▲3923.44 ▼0.19601.25 ▼66.6752.02 ▲1.75
Media Library /wp-admin/upload.php1,412 ▲244.21 ▼0.0394.22 ▼20.1441.75 ▼4.99
Translations /wp-admin/edit.php?post_type=translation1,0692.0031.7426.97
Add New /wp-admin/post-new.php?post_type=translation2,5627.65165.8564.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/lingo/main.php+427
    Undefined index: HTTP_ACCEPT_LANGUAGE
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=translation
    • > Notice in wp-content/plugins/lingo/main.php+185
    Undefined index: HTTP_ACCEPT_LANGUAGE

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 items
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lingo/metabox.php:9
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_filter' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_filter' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_action' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_action' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_action' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_action' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_action' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_action' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53
    • > PHP Warning
      call_user_func_array() expects parameter 1 to be a valid callback, function 'add_action' not found or invalid function name in wp-content/plugins/lingo/main.php on line 53

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: admin, post, language, international, translate...

lingo/main.php 92% from 13 tests

The principal PHP file in "Lingo" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("lingo.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected495 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP226311379
CSS113049
PO File1141448
JavaScript115019

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1777.27%
▷ Protected methods00.00%
▷ Private methods522.73%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin