84% gp-translation-propagation

Code Review | GlotPress – Translation Propagation

WordPress plugin GlotPress – Translation Propagation scored84%from 54 tests.

About plugin

  • Plugin page: gp-translation-pr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Mar 26, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ocean90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.29ms] Passed 4 tests

An overview of server-side resources used by GlotPress – Translation Propagation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.59 ▼1.21
Dashboard /wp-admin3.35 ▲0.0451.67 ▼0.58
Posts /wp-admin/edit.php3.40 ▲0.0451.78 ▼0.57
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.79 ▼8.55
Media Library /wp-admin/upload.php3.27 ▲0.0437.80 ▼2.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

GlotPress – Translation Propagation: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.071.71 ▲0.0742.46 ▼9.25
Dashboard /wp-admin2,189 ▲95.52 ▼0.1289.36 ▼3.3537.69 ▼4.61
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0140.63 ▼0.1235.03 ▼4.35
Add New Post /wp-admin/post-new.php1,527 ▼1623.19 ▲5.14612.09 ▼48.4751.03 ▼17.02
Media Library /wp-admin/upload.php1,394 ▼94.17 ▼0.0096.73 ▼12.9842.03 ▼4.09

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'GP_CLI_Import_Originals' not found in wp-content/plugins/gp-translation-propagation/includes/cli/import-originals.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GP_CLI_Translation_Set' not found in wp-content/plugins/gp-translation-propagation/includes/cli/translation-set.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gp-translation-propagation/gp-translation-propagation.php:32

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)
Everything seems fine on the user side

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
2 plugin tags: translation, glotpress

gp-translation-propagation/gp-translation-propagation.php Passed 13 tests

This is the main PHP file of "GlotPress – Translation Propagation" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Brings Translation Propagation to GlotPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin221 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP461226203
Markdown210018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity12.33
▷ Minimum class complexity3.00
▷ Maximum class complexity29.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods763.64%
▷ Protected methods19.09%
▷ Private methods327.27%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin