99% woo-special-offers

Code Review | WooCommerce Special Offers

WordPress plugin WooCommerce Special Offers scored 99% from 54 tests.

About plugin

  • Plugin page: woo-special-offers
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Mar 8, 2018
  • Latest release: Nov 20, 2019
  • Number of updates: 11
  • Update frequency: every 56.6 days
  • Top authors: ashour (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 952 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by WooCommerce Special Offers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1232.44 ▲3.65
Dashboard /wp-admin3.06 ▲0.0043.00 ▼1.67
Posts /wp-admin/edit.php3.11 ▲0.0041.92 ▲4.33
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.64 ▼571.15
Media Library /wp-admin/upload.php3.00 ▼0.0128.78 ▼7.97

Server storage [IO: ▲0.05MB] [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: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Special Offers
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.91 ▲0.279.78 ▲2.0048.54 ▲0.55
Dashboard /wp-admin2,973 ▲426.06 ▲0.11139.05 ▼17.79113.08 ▼5.28
Posts /wp-admin/edit.php2,739 ▲32.70 ▼0.0170.97 ▲7.8089.21 ▲1.67
Add New Post /wp-admin/post-new.php1,615 ▲11721.49 ▲2.69283.11 ▼86.32103.82 ▼11.61
Media Library /wp-admin/upload.php1,807 ▼35.04 ▲0.02159.47 ▲16.94118.26 ▼19.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt might help

woo-special-offers/woo-special-offers.php 92% from 13 tests

The principal PHP file in "WooCommerce Special Offers" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected645 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP136640538
JavaScript3432082
CSS28025

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity86.00
▷ Minimum class complexity86.00
▷ Maximum class complexity86.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3391.67%
▷ Protected methods00.00%
▷ Private methods38.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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