84% translation-stats

Code Review | Translation Stats

WordPress plugin Translation Stats scored 84% from 54 tests.

About plugin

  • Plugin page: translation-stats
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2018
  • Latest release: Apr 18, 2023
  • Number of updates: 182
  • Update frequency: every 8.9 days
  • Top authors: pedromendonca (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20+ active / 5,700 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.80MB] [CPU: ▲1.30ms] 75% from 4 tests

A check of server-side resources used by Translation Stats
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 620.49ms on /wp-admin/options-general.php?page=translation-stats)
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6847.96 ▲0.98
Dashboard /wp-admin4.18 ▲0.8856.53 ▲5.96
Posts /wp-admin/edit.php4.23 ▲0.8849.85 ▲3.01
Add New Post /wp-admin/post-new.php6.70 ▲0.8190.02 ▼3.91
Media Library /wp-admin/upload.php4.04 ▲0.8141.60 ▲5.10
Translation Stats /wp-admin/options-general.php?page=translation-stats5.16620.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Translation Stats
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.33 ▼0.881.88 ▼0.1747.55 ▲3.07
Dashboard /wp-admin2,210 ▲254.87 ▼1.09114.86 ▲14.9043.36 ▲3.14
Posts /wp-admin/edit.php2,093 ▲72.01 ▲0.0234.66 ▼2.8835.61 ▲1.28
Add New Post /wp-admin/post-new.php1,517 ▼217.67 ▼5.75643.58 ▼34.7062.70 ▼0.51
Media Library /wp-admin/upload.php1,383 ▼54.24 ▲0.0199.09 ▼12.0544.81 ▼3.56
Translation Stats /wp-admin/options-general.php?page=translation-stats2,3202.2154.2147.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=translation-stats
    • > Notice in wp-content/plugins/translation-stats/includes/class-settings-section-debug.php+217
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=translation-stats
    • > Notice in wp-content/plugins/translation-stats/includes/class-settings-section-debug.php+217
    Trying to access array offset on value of type null

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
7 plugin tags: internationalization, l10n, glotpress, i18n, localization...

translation-stats/translation-stats.php Passed 13 tests

The main PHP file in "Translation Stats" ver. 1.2.5 adds more information about the plugin and also serves as the entry point for this plugin
57 characters long description:
Show plugins translation stats on your WordPress install.

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
Everything looks great! No dangerous files found in this plugin11,212 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63251,0425,098
PHP321,2441,7664,963
SVG303441
CSS21017395
PO File1125180314
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity8.90
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes29
▷ Abstract classes26.90%
▷ Concrete classes2793.10%
▷ Final classes00.00%
Methods122
▷ Static methods2822.95%
▷ Public methods122100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants12
▷ Global constants12100.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
1 PNG file occupies 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-color-transparent.png142.22KB58.03KB▼ 59.20%