10% uniform-js

Code Review | WP UniformJS

WordPress plugin WP UniformJS scored10%from 54 tests.

About plugin

  • Plugin page: uniform-js
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Mar 31, 2013
  • Latest release: Jan 13, 2015
  • Number of updates: 13
  • Update frequency: every 64.6 days
  • Top authors: matthewwoodard (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,679 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/uniform-js/uniformjs.php+17
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.93MB] [CPU: ▼51.74ms] Passed 4 tests

Analyzing server-side resources used by WP UniformJS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.38 ▼31.82
Dashboard /wp-admin2.08 ▼1.266.86 ▼53.58
Posts /wp-admin/edit.php2.08 ▼1.277.40 ▼38.27
Add New Post /wp-admin/post-new.php2.08 ▼3.806.43 ▼83.29
Media Library /wp-admin/upload.php2.08 ▼1.155.39 ▼28.63
UniformJS /wp-admin/options-general.php?page=uniformjs2.086.50

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP UniformJS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲17613.62 ▼0.676.73 ▲4.9441.87 ▲1.20
Dashboard /wp-admin2,210 ▲284.85 ▼0.0797.88 ▼6.6939.29 ▼3.52
Posts /wp-admin/edit.php2,096 ▲41.99 ▲0.0239.16 ▲0.2234.65 ▼2.85
Add New Post /wp-admin/post-new.php1,517 ▼417.37 ▼5.79589.51 ▼86.4158.26 ▼0.88
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0494.33 ▼17.7541.47 ▼6.23
UniformJS /wp-admin/options-general.php?page=uniformjs8182.0423.4026.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/uniform-js/uniformjs.php+17
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=uniformjs
    • > Notice in wp-content/plugins/uniform-js/uniformjs.php+73
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=uniformjs
    • > Notice in wp-content/plugins/uniform-js/uniformjs.php+64
    Undefined variable: uniformjs_style

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: A description for screenshot #3 is required in uniform-js/assets to your readme.txt
The official readme.txt is a good inspiration

uniform-js/uniformjs.php 92% from 13 tests

The main file in "WP UniformJS" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("uniform-js.php" instead of "uniformjs.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
There were no executable files found in this plugin1,059 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS34970981
PHP1351977
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bg-input-focus-aristo.png0.18KB0.18KB▼ 1.08%
images/bg-input.png0.14KB0.10KB▼ 28.67%
images/sprite-agent.png16.16KB8.29KB▼ 48.67%
images/bg-input-focus.png0.14KB0.10KB▼ 27.27%
images/bg-input-agent.png0.18KB0.19KB0.00%