84% wpglobus-translate-options

Code Review | WPGlobus Translate Options

WordPress plugin WPGlobus Translate Options scored84%from 54 tests.

About plugin

  • Plugin page: wpglobus-translat...
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2015
  • Latest release: Feb 11, 2023
  • Number of updates: 90
  • Update frequency: every 31.6 days
  • Top authors: alexgff (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /46,572 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.02MB] [CPU: ▼0.57ms] Passed 4 tests

An overview of server-side resources used by WPGlobus Translate Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.65 ▲4.26
Dashboard /wp-admin3.32 ▲0.0248.26 ▼0.56
Posts /wp-admin/edit.php3.38 ▲0.0244.88 ▼5.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.85 ▲10.74
Media Library /wp-admin/upload.php3.25 ▲0.0234.57 ▲0.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WPGlobus Translate Options: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.311.74 ▲0.2544.33 ▲1.32
Dashboard /wp-admin2,195 ▲215.65 ▲0.0488.39 ▲4.1042.44 ▼2.44
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0534.18 ▼5.6737.59 ▲1.08
Add New Post /wp-admin/post-new.php1,537 ▲918.14 ▼5.13587.26 ▼91.9269.14 ▲11.78
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.00100.35 ▼13.2343.03 ▼6.02

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wpglobus-translate-options/includes/templates/about.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/wpglobus-translate-options/includes/page-theme.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/wpglobus-translate-options/includes/templates/page-theme.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wpglobus-translate-options/includes/class-wpglobus-to-rest-controller.php:19

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: translate, wpglobus, multilingual, localization, translation

wpglobus-translate-options/wpglobus-translate-options.php Passed 13 tests

Analyzing the main PHP file in "WPGlobus Translate Options" version 2.2.0
55 characters long description:
Translate options from 'wp_options' table for WPGlobus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,292 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP75778931,872
JSON400204
Markdown1530113
JavaScript6132663
CSS30140

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity61.50
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods72
▷ Static methods1622.22%
▷ Public methods5880.56%
▷ Protected methods1419.44%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants318.75%
▷ Class constants1381.25%
▷ Public constants13100.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
No PNG images were found in this plugin