84% wpglobus

Code Review | WPGlobus - Multilingual Everything!

WordPress plugin WPGlobus - Multilingual Everything! scored84%from 54 tests.

About plugin

  • Plugin page: wpglobus
  • Plugin version: 2.12.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2014
  • Latest release: Jun 14, 2023
  • Number of updates: 748
  • Update frequency: every 4.3 days
  • Top authors: tivnet (84.49%)tivnetinc (15.64%)

Code review

54 tests

User reviews

223 reviews

Install metrics

10,000+ active /1,044,093 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲2.47MB] [CPU: ▲13.88ms] 75% from 4 tests

An overview of server-side resources used by WPGlobus - Multilingual Everything!
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,068.75ms on /wp-admin/plugin-install.php?tab=search&s=WPGlobus&source=WPGlobus)
PageMemory (MB)CPU Time (ms)
Home /5.42 ▲1.9651.41 ▲10.31
Dashboard /wp-admin6.13 ▲2.8371.08 ▲21.45
Posts /wp-admin/edit.php5.95 ▲2.5974.82 ▲20.52
Add New Post /wp-admin/post-new.php8.66 ▲2.78108.11 ▲4.19
Media Library /wp-admin/upload.php5.79 ▲2.5653.78 ▲20.51
WPGlobus /wp-admin/admin.php?page=wpglobus_options6.1664.17
/wp-admin/admin.php?page=wpglobus-clean5.8950.79
/wp-admin/admin.php?page=wpglobus-admin-central5.7346.66
Help Desk /wp-admin/admin.php?page=wpglobus-helpdesk5.7648.88
/wp-admin/admin.php?page=wpglobus-about5.7845.46
/wp-admin/admin.php?page=wpglobus_language_edit5.8748.59
Add-ons /wp-admin/plugin-install.php?tab=search&s=WPGlobus&source=WPGlobus6.461,068.75

Server storage [IO: ▲6.63MB] [DB: ▲0.04MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 696 new files
Database: no new tables, 12 new options
New WordPress options
theysaidso_admin_options
widget_wpglobus
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
wpglobus_option_en_language_names
wpglobus_option_language_names
wpglobus_option_versioning
wpglobus_option_flags
...

Browser metrics Passed 4 tests

An overview of browser requirements for WPGlobus - Multilingual Everything!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,023 ▲23713.54 ▼1.029.78 ▲7.8135.78 ▼1.91
Dashboard /wp-admin2,330 ▲1535.71 ▲0.06103.08 ▲13.2191.50 ▲48.75
Posts /wp-admin/edit.php2,353 ▲2532.89 ▲0.9360.84 ▲20.9657.23 ▲22.89
Add New Post /wp-admin/post-new.php6,593 ▲5,06728.58 ▲5.26931.34 ▲251.8441.12 ▼13.93
Media Library /wp-admin/upload.php1,470 ▲674.24 ▲0.0499.64 ▼3.3272.33 ▲26.42
WPGlobus /wp-admin/admin.php?page=wpglobus_options3,9444.5196.67114.63
/wp-admin/admin.php?page=wpglobus-clean1,1892.8552.6559.91
/wp-admin/admin.php?page=wpglobus-admin-central1,0702.5345.5033.33
Help Desk /wp-admin/admin.php?page=wpglobus-helpdesk1,0442.1125.4845.23
/wp-admin/admin.php?page=wpglobus-about1,0322.0924.6447.19
/wp-admin/admin.php?page=wpglobus_language_edit7221.516.4218.10
Add-ons /wp-admin/plugin-install.php?tab=search&s=WPGlobus&source=WPGlobus1,5052.3239.1036.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 12 options in the database
    • can_compress_scripts
    • wpglobus_option_locale
    • wpglobus_option_flags
    • widget_theysaidso_widget
    • widget_wpglobus
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • wpglobus_option_en_language_names
    • theysaidso_admin_options
    • ...

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 39× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wpglobus/includes/options/fields/table/class-wpglobus-languages-table.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpglobus/includes/admin/class-wpglobus-customize-options.php on line 43
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-wp-customize-control.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpglobus/includes/admin/class-wpglobus-customize-options.php on line 43
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wpglobus/includes/vendor/wpglobus-vendors.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'WPGlobus_Builder' not found in wp-content/plugins/wpglobus/includes/builders/pods/class-wpglobus-pods.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WPGlobus_Builder_Update_Post' not found in wp-content/plugins/wpglobus/includes/builders/pods/class-wpglobus-pods-update-post.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpglobus/includes/wpglobus-controller.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPGlobus_Builder' not found in wp-content/plugins/wpglobus/includes/builders/rank_math_seo/class-wpglobus-rank_math_seo.php:16
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpglobus/includes/builders/elementor/class-wpglobus-elementor.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'WPGlobus_Builder_Update_Post' not found in wp-content/plugins/wpglobus/includes/builders/rank_math_seo/class-wpglobus-rank_math_seo-update-post.php:16

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: translate, localization, multilingual, wpglobus, multilanguage

wpglobus/wpglobus.php Passed 13 tests

The entry point to "WPGlobus - Multilingual Everything!" version 2.12.2 is a PHP file that has certain tags in its header comment area
125 characters long description:
A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!

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
Good job! No executable or dangerous file extensions detected85,310 lines of code in 320 files:
LanguageFilesBlank linesComment linesLines of code
PO File3812,2721,70932,363
JavaScript1075,1857,02626,352
PHP1297,50817,20924,026
Sass11254631,369
CSS1714147790
JSON1300281
Markdown4550122
SVG1017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity34.17
▷ Minimum class complexity1.00
▷ Maximum class complexity369.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity81.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes105
▷ Abstract classes10.95%
▷ Concrete classes10499.05%
▷ Final classes00.00%
Methods931
▷ Static methods55559.61%
▷ Public methods75881.42%
▷ Protected methods16818.05%
▷ Private methods50.54%
Functions14
▷ Named functions1071.43%
▷ Anonymous functions428.57%
Constants60
▷ Global constants46.67%
▷ Class constants5693.33%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
317 compressed PNG files occupy 0.67MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flags/us.png0.45KB0.46KB0.00%
flags/as.png0.47KB0.50KB0.00%
flags/mh.png0.53KB0.56KB0.00%
flags/uz.png0.34KB0.37KB0.00%
flags/sy.png0.18KB0.18KB0.00%