93% bg-hide-email-address

Code Review | Hide Email Address

WordPress plugin Hide Email Address scored 93% from 54 tests.

About plugin

  • Plugin page: bg-hide-email-add...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.8
  • WordPress version: 5.8.1
  • First release: Nov 13, 2018
  • Latest release: Nov 13, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: buntegiraffe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 610 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Hide Email Address
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1432.37 ▲8.82
Dashboard /wp-admin3.08 ▲0.0345.93 ▼2.74
Posts /wp-admin/edit.php3.14 ▲0.0348.24 ▼3.14
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.29 ▼562.09
Media Library /wp-admin/upload.php3.03 ▲0.0333.68 ▼0.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Hide Email Address
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.96 ▼0.029.59 ▼3.2347.75 ▲0.32
Dashboard /wp-admin2,975 ▲445.90 ▼0.02154.98 ▼7.79111.94 ▲2.51
Posts /wp-admin/edit.php2,741 ▲22.71 ▼0.0178.54 ▲9.8389.02 ▲1.94
Add New Post /wp-admin/post-new.php1,617 ▼6621.56 ▲5.33294.24 ▼128.3598.88 ▼11.66
Media Library /wp-admin/upload.php1,809 ▲25.03 ▼0.02167.22 ▲8.38112.00 ▼7.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

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)
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 fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bg-hide-email-address/BgHideEmailAddress.php
    • > /wp-content/plugins/bg-hide-email-address/ErrorLogging.php

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Hide Email Address button on the TimyMCE toolbar), #2 (Resulting text - visualy no difference to the rest of the paragraph), #3 (Selecting the protected email address)
You can look at the official readme.txt

bg-hide-email-address/BgHideEmailAddress.php 77% from 13 tests

The primary PHP file in "Hide Email Address" version 0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("bg-hide-email-address.php" instead of "BgHideEmailAddress.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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 detected246 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP36036151
JavaScript2292181
CSS10014

PHP code Passed 2 tests

An short overview of 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.19
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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