94% lh-script-ids

Code Review | LH Script Ids

WordPress plugin LH Script Ids scored 94% from 54 tests.

About plugin

  • Plugin page: lh-script-ids
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 5.9.2
  • First release: Jun 8, 2018
  • Latest release: Oct 6, 2020
  • Number of updates: 3
  • Update frequency: every 284.0 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 438 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by LH Script Ids
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0255.51 ▲4.95
Dashboard /wp-admin3.42 ▲0.0133.49 ▼5.43
Posts /wp-admin/edit.php3.65 ▲0.0137.87 ▲1.95
Add New Post /wp-admin/post-new.php6.89 ▼0.0898.53 ▼1,159.45
Media Library /wp-admin/upload.php3.30 ▲0.0125.26 ▲2.21

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by LH Script Ids
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,785 ▲2715.87 ▲0.196.73 ▲0.992.24 ▼0.57
Dashboard /wp-admin2,895 ▲376.04 ▼0.14117.42 ▼15.31154.67 ▼7.16
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0064.62 ▲1.22141.30 ▼1.36
Add New Post /wp-admin/post-new.php1,696 ▲3521.00 ▲5.39413.99 ▼19.40155.80 ▲0.78
Media Library /wp-admin/upload.php1,698 ▼05.57 ▲0.06146.40 ▲0.04182.20 ▼2.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lh-script-ids/lh-script-ids.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: id, script, attribute, enqueue

lh-script-ids/lh-script-ids.php Passed 13 tests

"LH Script Ids" version 1.00's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
A plugin to ensure every script enqueued by wordpress has a html id attribute

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 plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1291427

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected