10% wp-smart-wishlist

Code Review | WP Smart Wishlist

WordPress plugin WP Smart Wishlist scored10%from 54 tests.

About plugin

  • Plugin page: wp-smart-wishlist
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2014
  • Latest release: Jan 23, 2018
  • Number of updates: 13
  • Update frequency: every 102.5 days
  • Top authors: rajanit2000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,847 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-smart-wishlist/install.php+176
    Methods with the same name as their class will not be constructors in a future version of PHP; WishlistWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼49.92ms] Passed 4 tests

This is a short check of server-side resources used by WP Smart Wishlist
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.389.69 ▼32.31
Dashboard /wp-admin2.10 ▼1.206.04 ▼42.12
Posts /wp-admin/edit.php2.10 ▼1.267.14 ▼40.90
Add New Post /wp-admin/post-new.php2.10 ▼3.795.77 ▼84.34
Media Library /wp-admin/upload.php2.10 ▼1.135.79 ▼30.89

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_wishlistwidget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Smart Wishlist
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.56 ▼0.872.41 ▲0.0442.86 ▼0.20
Dashboard /wp-admin2,206 ▲215.91 ▲0.1297.15 ▼5.1738.49 ▼5.97
Posts /wp-admin/edit.php2,068 ▼212.01 ▼0.0134.73 ▼0.7434.51 ▼1.66
Add New Post /wp-admin/post-new.php1,514 ▼717.70 ▼5.51678.68 ▼33.8260.86 ▲0.62
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0398.74 ▼6.2241.37 ▼3.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-smart-wishlist/install.php+176
    Methods with the same name as their class will not be constructors in a future version of PHP; WishlistWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_wishlistwidget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-wishlist/install.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png)
The official readme.txt is a good inspiration

wp-smart-wishlist/install.php 92% from 13 tests

The main PHP file in "WP Smart Wishlist" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-smart-wishlist.php" instead of "install.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin169 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13824157
CSS10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.22MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.25KB6.42KB▼ 51.57%
banner-772x250.png183.66KB89.45KB▼ 51.30%
screenshot-2.png22.43KB8.37KB▼ 62.70%
image/notfound.png1.37KB0.33KB▼ 75.93%
image/remove.png0.91KB0.69KB▼ 23.60%