90% woo-default-attributes

Code Review | Woo Default Attributes

WordPress plugin Woo Default Attributes scored90%from 54 tests.

About plugin

  • Plugin page: woo-default-attri...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Nov 14, 2016
  • Latest release: Dec 9, 2018
  • Number of updates: 14
  • Update frequency: every 54.1 days
  • Top authors: Kuuak (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /7,026 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Woo Default Attributes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.35 ▼0.73
Dashboard /wp-admin3.31 ▼0.0448.59 ▼17.79
Posts /wp-admin/edit.php3.36 ▲0.0044.95 ▼9.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.66 ▼11.04
Media Library /wp-admin/upload.php3.23 ▲0.0036.79 ▲0.54

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Woo Default Attributes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.24 ▼0.031.80 ▲0.2745.26 ▲4.11
Dashboard /wp-admin2,198 ▲245.64 ▲0.0087.61 ▼20.6739.14 ▼3.85
Posts /wp-admin/edit.php2,100 ▲32.07 ▲0.0634.46 ▼6.3038.48 ▼5.19
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.06677.30 ▲24.6753.86 ▼0.38
Media Library /wp-admin/upload.php1,397 ▼04.24 ▲0.02102.75 ▲2.2841.70 ▼4.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: administration, attribute, attributes, woocommerce, admin

woo-default-attributes/woo-default-attributes.php 92% from 13 tests

The main PHP script in "Woo Default Attributes" version 1.0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin418 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP577260248
CSS18081
JavaScript1211550
PO File1101039

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1881.82%
▷ Protected methods00.00%
▷ Private methods418.18%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/css/drag-grip.png0.37KB0.22KB▼ 38.77%