84% translation-preserver

Code Review | Translation Preserver

WordPress plugin Translation Preserver scored84%from 54 tests.

About plugin

  • Plugin page: translation-prese...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9
  • WordPress version: 6.3.1
  • First release: Nov 5, 2011
  • Latest release: Apr 16, 2014
  • Number of updates: 8
  • Update frequency: every 111.6 days
  • Top authors: uglyrobot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,689 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Translation Preserver
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0135.83 ▼6.27
Dashboard /wp-admin3.31 ▲0.0145.83 ▼4.72
Posts /wp-admin/edit.php3.36 ▲0.0042.75 ▼5.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.16 ▲4.78
Media Library /wp-admin/upload.php3.23 ▲0.0032.89 ▼0.51

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Translation Preserver
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.111.66 ▼0.1737.55 ▼8.91
Dashboard /wp-admin2,206 ▲155.88 ▲1.01111.44 ▼5.8643.24 ▼3.73
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0239.51 ▲2.2338.14 ▲2.91
Add New Post /wp-admin/post-new.php1,533 ▼123.16 ▲0.03618.01 ▼21.9154.86 ▲2.84
Media Library /wp-admin/upload.php1,391 ▼04.24 ▲0.05100.97 ▼2.2143.32 ▲0.00

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/translation-preserver/translation-preserver.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: translate, i18n, translation, language

translation-preserver/translation-preserver.php 92% from 13 tests

This is the main PHP file of "Translation Preserver" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)

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
Good job! No executable or dangerous file extensions detected9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16209

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin