84% emoji-guard

Code Review | Emoji Guard

WordPress plugin Emoji Guard scored84%from 54 tests.

About plugin

  • Plugin page: emoji-guard
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 7, 2020
  • Latest release: Aug 7, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /346 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.01ms] Passed 4 tests

Analyzing server-side resources used by Emoji Guard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.88 ▲1.66
Dashboard /wp-admin3.31 ▼0.0442.54 ▼16.05
Posts /wp-admin/edit.php3.36 ▲0.0042.22 ▼5.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.02 ▼10.35
Media Library /wp-admin/upload.php3.23 ▲0.0033.13 ▼4.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Emoji Guard
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.334.03 ▲2.1539.04 ▼0.54
Dashboard /wp-admin2,203 ▲155.91 ▲1.01104.95 ▲2.1440.89 ▼2.05
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.1434.94 ▼5.9432.89 ▼4.16
Add New Post /wp-admin/post-new.php1,543 ▲118.55 ▲0.52602.00 ▲5.5458.34 ▲12.92
Media Library /wp-admin/upload.php1,388 ▼04.32 ▲0.1494.75 ▼3.5644.05 ▼1.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Palasthotel\\EmojiGuard\\load_plugin_textdomain() in wp-content/plugins/emoji-guard/plugin.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: validation

emoji-guard/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Emoji Guard" version 1.0.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("emoji-guard.php" instead of "plugin.php")

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
There were no executable files found in this plugin127 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1203090
PO File17837

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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
Namespaces1
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin