90% woo-product-suggest

Code Review | Woo Product Suggest

WordPress plugin Woo Product Suggest scored90%from 54 tests.

About plugin

  • Plugin page: woo-product-suggest
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2016
  • Latest release: Oct 31, 2017
  • Number of updates: 10
  • Update frequency: every 32.3 days
  • Top authors: mahdiyazdani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,575 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: ▼5.72ms] Passed 4 tests

Analyzing server-side resources used by Woo Product Suggest
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.88 ▼4.92
Dashboard /wp-admin3.32 ▼0.0350.55 ▼14.02
Posts /wp-admin/edit.php3.37 ▲0.0150.37 ▲1.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.75 ▼5.74
Media Library /wp-admin/upload.php3.24 ▲0.0139.71 ▲3.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Woo Product Suggest
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.22 ▼1.051.73 ▲0.0145.43 ▲1.89
Dashboard /wp-admin2,220 ▲314.85 ▼0.08107.92 ▼6.2840.95 ▼4.63
Posts /wp-admin/edit.php2,102 ▲102.01 ▼0.0534.32 ▼7.4836.50 ▼3.06
Add New Post /wp-admin/post-new.php1,540 ▲1223.15 ▲4.95718.33 ▲114.4460.61 ▲7.45
Media Library /wp-admin/upload.php1,396 ▲84.29 ▲0.09107.63 ▲4.1946.60 ▲2.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 no errors were found, this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: new version of product, offer bundle, promote new product, custom product notice, suggest new product...

woo-product-suggest/woo-product-suggest.php 92% from 13 tests

The main file in "Woo Product Suggest" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.8" instead of "3.0.0")

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
There were no executable files found in this plugin175 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21697175

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/hypermarket-plus.png60.43KB19.54KB▼ 67.66%