93% display-text-domains

Code Review | Display text domains

WordPress plugin Display text domains scored 93% from 53 tests.

About plugin

  • Plugin page: display-text-domains
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 5.8.1
  • First release: Nov 26, 2015
  • Latest release: Jun 25, 2017
  • Number of updates: 18
  • Update frequency: every 32.2 days
  • Top authors: Papik81 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 841 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼266.66ms] Passed 4 tests

An overview of server-side resources used by Display text domains
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0239.75 ▲4.09
Dashboard /wp-admin3.08 ▲0.0244.04 ▼0.29
Posts /wp-admin/edit.php3.13 ▲0.0243.41 ▲0.04
Add New Post /wp-admin/post-new.php5.44 ▲0.0185.15 ▼1,061.09
Media Library /wp-admin/upload.php3.02 ▲0.0134.06 ▼5.31
Display text domains /wp-admin/tools.php?page=cc-display-domains2.9928.32

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Display text domains
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲4815.86 ▲0.228.05 ▼0.4753.34 ▲6.25
Dashboard /wp-admin2,932 ▲825.88 ▲0.01139.00 ▲7.80109.43 ▲13.28
Posts /wp-admin/edit.php2,711 ▲52.69 ▲0.0063.29 ▲0.1488.94 ▲7.86
Add New Post /wp-admin/post-new.php1,659 ▼19218.41 ▲1.30375.19 ▲3.30121.26 ▲10.96
Media Library /wp-admin/upload.php1,777 ▲25.02 ▲0.03152.95 ▲4.54108.14 ▼8.38
Display text domains /wp-admin/tools.php?page=cc-display-domains1,0462.0954.2275.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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)
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/display-text-domains/text-domain-loadmap.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Czech translation example)
You can take inspiration from this readme.txt

display-text-domains/text-domain-loadmap.php 85% from 13 tests

The main file in "Display text domains" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 218 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("display-text-domains.php" instead of "text-domain-loadmap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected44 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141844

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.58
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin