84% bea-fix-loco-translate

Code Review | BEA - Fix Loco Translate

WordPress plugin BEA - Fix Loco Translate scored84%from 54 tests.

About plugin

  • Plugin page: bea-fix-loco-tran...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Jul 27, 2018
  • Number of updates: 7
  • Update frequency: every 10.4 days
  • Top authors: MaximeCulea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,631 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by BEA - Fix Loco Translate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.47 ▼3.10
Dashboard /wp-admin3.32 ▼0.0345.63 ▼13.77
Posts /wp-admin/edit.php3.37 ▲0.0148.36 ▼1.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.07 ▼12.55
Media Library /wp-admin/upload.php3.24 ▲0.0138.98 ▲5.64

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by BEA - Fix Loco Translate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.62 ▼1.001.63 ▼0.6441.27 ▼9.11
Dashboard /wp-admin2,209 ▲184.85 ▼1.01105.27 ▲5.6936.14 ▼2.94
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0138.59 ▲4.5633.87 ▼0.69
Add New Post /wp-admin/post-new.php1,522 ▲323.25 ▼0.17630.66 ▼42.5854.55 ▼4.95
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.1195.23 ▲1.2240.87 ▼2.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/bea-fix-loco-translate/bea-fix-loco-translate.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: mu-plugin, loco translate, loco translate add-on

bea-fix-loco-translate/bea-fix-loco-translate.php Passed 13 tests

The entry point to "BEA - Fix Loco Translate" version 1.1.1 is a PHP file that has certain tags in its header comment area
42 characters long description:
Improve Loco Translate's plugin behaviour.

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
There were no executable files found in this plugin365 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP881212364
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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