84% obselling

Code Review | Obselling - Sell other products of an obsolete product or out of stock.

WordPress plugin Obselling - Sell other products of an obsolete product or out of stock. scored 84% from 54 tests.

About plugin

  • Plugin page: obselling
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 19, 2022
  • Latest release: Sep 16, 2023
  • Number of updates: 61
  • Update frequency: every 7.2 days
  • Top authors: olivierwpt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.01ms] Passed 4 tests

This is a short check of server-side resources used by Obselling - Sell other products of an obsolete product or out of stock.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.34 ▼9.60
Dashboard /wp-admin3.31 ▲0.0043.13 ▼6.16
Posts /wp-admin/edit.php3.36 ▲0.0046.33 ▼3.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.87 ▼17.22
Media Library /wp-admin/upload.php3.23 ▲0.0032.37 ▼2.71

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Obselling - Sell other products of an obsolete product or out of stock.
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.151.59 ▼0.5140.32 ▼3.22
Dashboard /wp-admin2,206 ▲215.90 ▲0.04109.82 ▼6.6838.15 ▼6.98
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0039.45 ▲5.7936.26 ▼1.22
Add New Post /wp-admin/post-new.php1,533 ▲1423.39 ▲0.21647.94 ▼12.0253.99 ▲0.77
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0096.58 ▼3.3443.01 ▼2.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/obselling/includes/functions.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

obselling/obselling.php Passed 13 tests

The principal PHP file in "Obselling - Sell other products of an obsolete product or out of stock." v. 1.2.2 is loaded by WordPress automatically on each request
59 characters long description:
Sell other products of an obsolete product or out of stock.

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
No dangerous file extensions were detected818 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1113531496
CSS2380218
PO File1294481
JavaScript18023

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin