83% memsource-connector

Code Review | Phrase TMS Integration for WordPress

WordPress plugin Phrase TMS Integration for WordPress scored 83% from 54 tests.

About plugin

  • Plugin page: memsource-connector
  • Plugin version: 4.5.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Aug 8, 2023
  • Number of updates: 88
  • Update frequency: every 28.4 days
  • Top authors: memsource (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 44,882 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
Install script ran successfully

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

Server-side resources used by Phrase TMS Integration for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.05 ▼1.42
Dashboard /wp-admin3.31 ▲0.0044.98 ▼17.68
Posts /wp-admin/edit.php3.36 ▲0.0049.58 ▲5.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.44 ▼6.44
Media Library /wp-admin/upload.php3.23 ▲0.0037.85 ▲1.86

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 78 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Phrase TMS Integration for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.191.79 ▲0.0244.18 ▼3.49
Dashboard /wp-admin2,206 ▲184.86 ▼0.05113.00 ▲10.8541.73 ▲4.62
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0240.69 ▲3.6535.91 ▲1.97
Add New Post /wp-admin/post-new.php1,533 ▲1423.16 ▼0.07676.23 ▼12.4755.15 ▲2.61
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.0597.44 ▼7.7143.78 ▼2.43

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Service\\Content\\AbstractPostService' not found in wp-content/plugins/memsource-connector/src/Service/Content/CustomPostService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Service\\Content\\AbstractTermService' not found in wp-content/plugins/memsource-connector/src/Service/Content/CategoryService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Page\\AbstractPage' not found in wp-content/plugins/memsource-connector/src/Page/ConnectorPage.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Page\\AbstractPage' not found in wp-content/plugins/memsource-connector/src/Page/LanguageMappingPage.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Page\\AbstractPage' not found in wp-content/plugins/memsource-connector/src/Page/AdvancedPage.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Service\\Content\\AbstractTermService' not found in wp-content/plugins/memsource-connector/src/Service/Content/TagService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Service\\Content\\AbstractContentService' not found in wp-content/plugins/memsource-connector/src/Service/Content/AbstractTermService.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/memsource-connector/memsource.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Service\\Content\\AbstractPostService' not found in wp-content/plugins/memsource-connector/src/Service/Content/ReusableBlockService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Memsource\\Service\\Content\\AbstractPostService' not found in wp-content/plugins/memsource-connector/src/Service/Content/PageService.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: phrase, localisation, wpml, multilingual, localization...

memsource-connector/memsource.php 77% from 13 tests

The main PHP script in "Phrase TMS Integration for WordPress" version 4.5.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/locale" does not exist
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("memsource-connector.php" instead of "memsource.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected6,549 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP671,2551,0756,019
JSON400203
CSS1130155
JavaScript2189154
SVG20018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces14
Interfaces2
Traits1
Classes63
▷ Abstract classes46.35%
▷ Concrete classes5993.65%
▷ Final classes46.78%
Methods419
▷ Static methods337.88%
▷ Public methods33680.19%
▷ Protected methods133.10%
▷ Private methods7016.71%
Functions34
▷ Named functions2676.47%
▷ Anonymous functions823.53%
Constants76
▷ Global constants33.95%
▷ Class constants7396.05%
▷ Public constants3345.21%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin