83% juiz-lang-attributes

Code Review | Juiz Lang Attribute

WordPress plugin Juiz Lang Attribute scored83%from 54 tests.

About plugin

  • Plugin page: juiz-lang-attributes
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2019
  • Latest release: Sep 24, 2022
  • Number of updates: 13
  • Update frequency: every 96.0 days
  • Top authors: CreativeJuiz (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /2,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Juiz Lang Attribute
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.08 ▼1.28
Dashboard /wp-admin3.32 ▲0.0248.19 ▲0.60
Posts /wp-admin/edit.php3.37 ▲0.0151.30 ▲5.20
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.04 ▼8.40
Media Library /wp-admin/upload.php3.24 ▲0.0132.70 ▼2.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Juiz Lang Attribute
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲5013.26 ▼1.111.71 ▼0.1442.02 ▼11.15
Dashboard /wp-admin2,213 ▲254.86 ▼0.03112.81 ▲5.7742.67 ▼1.47
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0639.42 ▼0.3933.87 ▼0.11
Add New Post /wp-admin/post-new.php6,337 ▲4,81819.04 ▼4.46898.08 ▲206.9467.58 ▼1.80
Media Library /wp-admin/upload.php1,395 ▲74.27 ▲0.1195.71 ▼8.5443.45 ▼1.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/juiz-lang-attributes/inc/admin/custom-menu-fields.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/admin/custom-meta-boxes.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/front/wp-head.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/admin/enqueues.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/front/nav-menu-link-attributes.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/classes/Juiz-Lang.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/functions/sanitize.php
    • > /wp-content/plugins/juiz-lang-attributes/juiz-lang.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/admin/gutenberg.php
    • > /wp-content/plugins/juiz-lang-attributes/inc/admin/tinyMCE.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Metabox for post), #2 (TinyMCE with new buttons), #3 (Attributes well placed on your HTML), #4 (Attributes in the Appearance > Menus > Item link details)
The official readme.txt might help

juiz-lang-attributes/juiz-lang.php 77% from 13 tests

The main file in "Juiz Lang Attribute" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 234 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("juiz-lang-attributes.php" instead of "juiz-lang.php")

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
Everything looks great! No dangerous files found in this plugin859 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript36234329
PHP1091179290
CSS33751184
PO File1366856

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
6 PNG files occupy 0.27MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/attribute-lang.png0.92KB1.00KB0.00%
screenshot-4.png39.15KB25.98KB▼ 33.66%
screenshot-2.png90.79KB65.13KB▼ 28.26%
screenshot-1.png76.52KB52.74KB▼ 31.07%
screenshot-3.png67.00KB48.86KB▼ 27.07%