78% eu-tyre-label-shortcode

Code Review | EU tyre label shortcode

WordPress plugin EU tyre label shortcode scored78%from 54 tests.

About plugin

  • Plugin page: eu-tyre-label-sho...
  • Plugin version: 1.0.20170920
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7
  • WordPress version: 6.3.1
  • First release: Sep 21, 2017
  • Latest release: Apr 13, 2021
  • Number of updates: 21
  • Update frequency: every 61.9 days
  • Top authors: frankleusing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,579 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 gracefully, with no errors

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

This is a short check of server-side resources used by EU tyre label shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.04 ▲0.47
Dashboard /wp-admin3.32 ▲0.0245.21 ▼0.11
Posts /wp-admin/edit.php3.38 ▲0.0242.82 ▼6.97
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.78 ▼9.32
Media Library /wp-admin/upload.php3.25 ▲0.0233.44 ▼2.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by EU tyre label shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.341.78 ▲0.1843.10 ▲3.23
Dashboard /wp-admin2,192 ▲185.48 ▼0.0680.90 ▼7.7237.32 ▼1.98
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0736.91 ▼5.0134.53 ▼3.90
Add New Post /wp-admin/post-new.php1,526 ▼223.31 ▲0.27647.32 ▼13.8053.28 ▼10.04
Media Library /wp-admin/upload.php1,394 ▼64.22 ▼0.0597.77 ▼17.1440.18 ▼7.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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/eu-tyre-label-shortcode/php/get-eu-tyre-label.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: size in wp-content/plugins/eu-tyre-label-shortcode/php/get-eu-tyre-label.php on line 32
    • > PHP Notice
      Undefined index: noise in wp-content/plugins/eu-tyre-label-shortcode/php/get-eu-tyre-label.php on line 26
    • > PHP Notice
      Undefined index: db in wp-content/plugins/eu-tyre-label-shortcode/php/get-eu-tyre-label.php on line 29
    • > PHP Notice
      Undefined index: grip in wp-content/plugins/eu-tyre-label-shortcode/php/get-eu-tyre-label.php on line 24
    • > PHP Notice
      Undefined index: fuel in wp-content/plugins/eu-tyre-label-shortcode/php/get-eu-tyre-label.php on line 21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: You can take inspiration from this readme.txt

eu-tyre-label-shortcode/eu-tyre-label.php 85% from 13 tests

The main PHP file in "EU tyre label shortcode" ver. 1.0.20170920 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 180 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("eu-tyre-label-shortcode.php" instead of "eu-tyre-label.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin201 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44552144
JavaScript16257

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
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 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/mce/mce-button-eutl-16.png0.59KB0.50KB▼ 15.44%
images/image-label-marker.png0.41KB0.38KB▼ 8.73%
images/image-db-1.png1.62KB1.88KB0.00%
images/image-db-3.png1.42KB1.70KB0.00%
images/image-label-blank.png22.55KB10.15KB▼ 55.00%