74% glotpress

Code Review | GlotPress

WordPress plugin GlotPress scored74%from 54 tests.

About plugin

  • Plugin page: glotpress
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Nov 22, 2015
  • Latest release: Apr 9, 2022
  • Number of updates: 115
  • Update frequency: every 43.1 days
  • Top authors: ocean90 (69.57%)glotpress (16.52%)GregRoss (15.65%)

Code review

54 tests

User reviews

12 reviews

Install metrics

600+ active /27,648 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲2.32MB] [CPU: ▲6.41ms] Passed 4 tests

A check of server-side resources used by GlotPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.82 ▲2.3659.74 ▲15.68
Dashboard /wp-admin5.65 ▲2.3562.33 ▲7.67
Posts /wp-admin/edit.php5.71 ▲2.3562.13 ▲9.37
Add New Post /wp-admin/post-new.php8.17 ▲2.28102.55 ▼7.09
Media Library /wp-admin/upload.php5.51 ▲2.2957.19 ▲17.65

Server storage [IO: ▲0.90MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 121 new files
Database: 8 new tables, 8 new options
New tables
wp_gp_projects
wp_gp_translation_sets
wp_gp_glossary_entries
wp_gp_glossaries
wp_gp_meta
wp_gp_permissions
wp_gp_originals
wp_gp_translations
New WordPress options
gp_db_version
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
gp_rewrite_rule
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for GlotPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.041.68 ▼0.1245.50 ▲5.64
Dashboard /wp-admin2,198 ▲215.63 ▲0.0885.53 ▼0.8240.18 ▲1.41
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0834.24 ▼3.5938.23 ▲5.48
Add New Post /wp-admin/post-new.php1,536 ▼122.91 ▼0.19685.77 ▲19.5149.84 ▼0.87
Media Library /wp-admin/upload.php1,403 ▼04.21 ▼0.05101.11 ▼2.4048.10 ▲2.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 8 tables in the database
    • wp_gp_projects
    • wp_gp_translations
    • wp_gp_meta
    • wp_gp_translation_sets
    • wp_gp_glossaries
    • wp_gp_originals
    • wp_gp_permissions
    • wp_gp_glossary_entries
  • Zombie WordPress options detected upon uninstall: 8 options
    • gp_rewrite_rule
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • gp_db_version
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 100× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function gp_title() in wp-content/plugins/glotpress/gp-templates/glossary-view.php:2
    • > PHP Warning
      Use of undefined constant GP_INC - assumed 'GP_INC' (this will throw an Error in a future version of PHP) in wp-content/plugins/glotpress/gp-settings.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'GP_Format' not found in wp-content/plugins/glotpress/gp-includes/formats/format-pomo.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GP_Thing' not found in wp-content/plugins/glotpress/gp-includes/things/original.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_json_encode() in wp-content/plugins/glotpress/gp-templates/404.api.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GP_Thing' not found in wp-content/plugins/glotpress/gp-includes/things/project.php:15
    • > PHP Notice
      Trying to get property 'translation_status' of non-object in wp-content/plugins/glotpress/gp-templates/translation-row-editor-meta.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function gp_title() in wp-content/plugins/glotpress/gp-templates/project-permissions.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'GP_Format' not found in wp-content/plugins/glotpress/gp-includes/formats/format-resx.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/glotpress/gp-includes/cli/regenerate-paths.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: translation

glotpress/glotpress.php Passed 13 tests

"GlotPress" version 3.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
52 characters long description:
GlotPress is a tool to help translators collaborate.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin17,525 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP1042,5685,17012,715
JavaScript122374633,161
CSS2252601,255
Markdown11340394

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity21.62
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes12.08%
▷ Concrete classes4797.92%
▷ Final classes00.00%
Methods366
▷ Static methods92.46%
▷ Public methods30282.51%
▷ Protected methods102.73%
▷ Private methods5414.75%
Functions183
▷ Named functions16187.98%
▷ Anonymous functions2212.02%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin