78% zanto

Code Review | Zanto WP Translation (For Multisites)

WordPress plugin Zanto WP Translation (For Multisites) scored78%from 54 tests.

About plugin

  • Plugin page: zanto
  • Plugin version: 0.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2013
  • Latest release: Mar 30, 2015
  • Number of updates: 85
  • Update frequency: every 5.6 days
  • Top authors: brooksX (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

20+ active /18,830 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.61ms] Passed 4 tests

Server-side resources used by Zanto WP Translation (For Multisites)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.95 ▼3.39
Dashboard /wp-admin3.31 ▲0.0053.21 ▲0.38
Posts /wp-admin/edit.php3.36 ▲0.0048.05 ▲2.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.54 ▼2.32
Media Library /wp-admin/upload.php3.23 ▲0.0034.42 ▼1.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Zanto WP Translation (For Multisites)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.29 ▲0.001.62 ▲0.0343.92 ▲4.70
Dashboard /wp-admin2,198 ▲185.59 ▼0.0287.99 ▼6.6241.65 ▼0.61
Posts /wp-admin/edit.php2,100 ▲212.01 ▲0.0239.77 ▲5.9337.22 ▼1.15
Add New Post /wp-admin/post-new.php1,537 ▲818.50 ▼4.56613.82 ▲26.8468.67 ▲8.06
Media Library /wp-admin/upload.php1,397 ▼34.27 ▲0.1094.10 ▼3.3340.91 ▼0.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 22× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/zanto/views/zwt-help-tabs.php
    • > /wp-content/plugins/zanto/classes/class.zwt-wp-tax.php
    • > /wp-content/plugins/zanto/menus/zwt-locale-management.php
    • > /wp-content/plugins/zanto/menus/translation-network.php
    • > /wp-content/plugins/zanto/classes/class.zwt-module.php
    • > /wp-content/plugins/zanto/zanto.php
    • > /wp-content/plugins/zanto/classes/class.zwt-widgets.php
    • > /wp-content/plugins/zanto/includes/ajax.php
    • > /wp-content/plugins/zanto/classes/class.zwt-mo.php
    • > /wp-content/plugins/zanto/includes/notices/email-notifications.php
  • 19× 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 zwt_noscript_notice() in wp-content/plugins/zanto/views/zwt-meta-options.php:1
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/zanto/views/zwt-help-tabs.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_active_languages() on null in wp-content/plugins/zanto/classes/class.zwt-edit-languages.php:214
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/zanto/views/zwt-help-tabs.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/zanto/views/page-settings.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/zanto/classes/class.zwt-edit-languages.php on line 214
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/zanto/views/debug-information.php:3
    • > PHP Notice
      Trying to get property 'modules' of non-object in wp-content/plugins/zanto/classes/class.zwt-edit-languages.php on line 214
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/zanto/views/zwt-help-tabs.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zanto/classes/class.zwt-browser-lang-redirect.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
9 plugin tags: multilingual, localization, language switcher, multisite, i18n...

zanto/zanto.php 92% from 13 tests

The entry point to "Zanto WP Translation (For Multisites)" version 0.3.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Success! There were no dangerous files found in this plugin14,523 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PHP421,3911,1647,184
CSS533201,926
PO File26547751,862
Sass1319221,158
LESS1319311,149
JavaScript512079709
SVG100504
XML10031

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity46.11
▷ Minimum class complexity5.00
▷ Maximum class complexity150.00
Average method complexity4.76
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes00.00%
Methods223
▷ Static methods188.07%
▷ Public methods20591.93%
▷ Protected methods177.62%
▷ Private methods10.45%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants1565.22%
▷ Class constants834.78%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
259 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags/en_US.png0.59KB0.65KB0.00%
images/flags/ke.png0.56KB0.69KB0.00%
images/flags/ck.png0.57KB0.68KB0.00%
images/flags/fk.png0.63KB0.75KB0.00%
images/menu-iconz.png0.44KB0.22KB▼ 49.67%