84% out-of-stock-by-tag

Code Review | Out of Stock by Tag

WordPress plugin Out of Stock by Tag scored84%from 54 tests.

About plugin

  • Plugin page: out-of-stock-by-tag
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Oct 30, 2020
  • Latest release: Nov 2, 2020
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: antochas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Out of Stock by Tag
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.62 ▲2.29
Dashboard /wp-admin3.32 ▲0.0145.89 ▼1.73
Posts /wp-admin/edit.php3.37 ▲0.0144.41 ▼2.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.97 ▼16.35
Media Library /wp-admin/upload.php3.24 ▲0.0135.78 ▲3.10
Out of Stock /wp-admin/admin.php?page=out-of-stock-by-tag-settings3.2628.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Out of Stock by Tag: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.67 ▼0.701.78 ▲0.1144.04 ▲1.25
Dashboard /wp-admin2,206 ▲215.88 ▲1.00106.50 ▼0.3640.99 ▼4.75
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0134.55 ▼8.2234.32 ▼5.73
Add New Post /wp-admin/post-new.php1,538 ▲1923.28 ▼0.18660.68 ▲17.6049.00 ▼17.20
Media Library /wp-admin/upload.php1,388 ▼04.27 ▲0.0698.96 ▼0.4141.30 ▼1.45
Out of Stock /wp-admin/admin.php?page=out-of-stock-by-tag-settings8232.0224.0533.67

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • 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 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=out-of-stock-by-tag-settings
    • > Notice in wp-content/plugins/out-of-stock-by-tag/admin/partials/out-of-stock-by-tag-admin-display.php+43
    Trying to get property 'name' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=out-of-stock-by-tag-settings
    • > Notice in wp-content/plugins/out-of-stock-by-tag/admin/partials/out-of-stock-by-tag-admin-display.php+43
    Trying to get property 'slug' of non-object

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (/assets/config.png) image not found
The official readme.txt might help

out-of-stock-by-tag/out-of-stock-by-tag.php Passed 13 tests

The main PHP file in "Out of Stock by Tag" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
101 characters long description:
Out of stock by Tag, will allow you to bulk set products as out of stock by either Tag or Categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin292 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11171548292

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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