90% attribute-dropdowns

Code Review | Attribute Dropdowns

WordPress plugin Attribute Dropdowns scored 90% from 54 tests.

About plugin

  • Plugin page: attribute-dropdowns
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2019
  • Latest release: Jul 16, 2022
  • Number of updates: 7
  • Update frequency: every 154.1 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,814 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
Installer ran successfully

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

This is a short check of server-side resources used by Attribute Dropdowns
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.26 ▼4.30
Dashboard /wp-admin3.32 ▲0.0149.19 ▼3.18
Posts /wp-admin/edit.php3.37 ▲0.0155.38 ▲2.87
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.12 ▲8.04
Media Library /wp-admin/upload.php3.24 ▲0.0140.27 ▼2.45

Server storage [IO: ▲0.02MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Attribute Dropdowns
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.25 ▼0.391.81 ▲0.0442.96 ▼0.43
Dashboard /wp-admin2,203 ▼65.80 ▲0.9597.54 ▼7.7336.53 ▼3.30
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0335.06 ▼4.8333.68 ▼8.00
Add New Post /wp-admin/post-new.php1,519 ▼1423.18 ▼0.43681.56 ▼125.5651.38 ▼4.04
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.01105.73 ▼4.7944.23 ▼3.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: search by attribute, product attributes, attribute dropdown selects, search widget, woocommerce product search

attribute-dropdowns/attribute-dropdowns.php Passed 13 tests

"Attribute Dropdowns" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
132 characters long description:
Displays multiple product attributes as a search box with drop-down selects. So that customer can search for products by attributes.

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
Good job! No executable or dangerous file extensions detected343 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP612926314
JavaScript126028
CSS1101

PHP code Passed 2 tests

A short 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.34
Average class complexity8.60
▷ Minimum class complexity7.00
▷ Maximum class complexity10.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods30
▷ Static methods13.33%
▷ Public methods2790.00%
▷ Protected methods00.00%
▷ Private methods310.00%
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
There were not PNG files found in your plugin