83% storefront-wishlist

Code Review | Storefront Wishlist

WordPress plugin Storefront Wishlist scored83%from 54 tests.

About plugin

  • Plugin page: storefront-wishlist
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Nov 13, 2017
  • Latest release: Jan 24, 2022
  • Number of updates: 17
  • Update frequency: every 90.3 days
  • Top authors: shramee (94.12%)PootlePress (11.76%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,154 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼13.28ms] Passed 4 tests

This is a short check of server-side resources used by Storefront Wishlist
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.33 ▼0.20
Dashboard /wp-admin3.36 ▲0.0147.11 ▼15.48
Posts /wp-admin/edit.php3.41 ▲0.0545.37 ▼4.39
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.24 ▼33.04
Media Library /wp-admin/upload.php3.28 ▲0.0536.08 ▲3.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Storefront Wishlist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.39 ▼0.161.78 ▲0.0344.18 ▲3.18
Dashboard /wp-admin2,195 ▲185.53 ▼0.0783.70 ▲0.1639.58 ▼4.59
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0434.12 ▼6.5934.40 ▼2.11
Add New Post /wp-admin/post-new.php1,526 ▼223.16 ▲0.16675.93 ▲81.5261.04 ▲3.37
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.0292.57 ▼10.6442.31 ▼2.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/storefront-wishlist/wishlist.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: These screenshots do not have images: #1 (Product Archive), #2 (Single product), #3 (Customizer - Wishlist settings)
The official readme.txt is a good inspiration

storefront-wishlist/wishlist.php 92% from 13 tests

The main PHP script in "Storefront Wishlist" version 1.4.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("storefront-wishlist.php" instead of "wishlist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin624 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP15993356
Sass1251205
JavaScript2161062
CSS1011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions0
▷ Named functions00.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
No PNG files were detected