78% ns-custom-placeholder-image-for-woocommerce

Code Review | NS Custom Placeholder Image for WooCommerce

WordPress plugin NS Custom Placeholder Image for WooCommerce scored 78% from 54 tests.

About plugin

  • Plugin page: ns-custom-placeho...
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2017
  • Latest release: Mar 24, 2023
  • Number of updates: 50
  • Update frequency: every 44.6 days
  • Top authors: nsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,548 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▲4.70ms] Passed 4 tests

A check of server-side resources used by NS Custom Placeholder Image for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.12 ▼1.59
Dashboard /wp-admin3.41 ▲0.1161.54 ▲10.62
Posts /wp-admin/edit.php3.53 ▲0.1757.69 ▲7.16
Add New Post /wp-admin/post-new.php6.00 ▲0.1199.35 ▲10.77
Media Library /wp-admin/upload.php3.32 ▲0.0937.01 ▲2.61
/wp-admin/admin.php?page=plugineye2443.3136.01
Placeholder /wp-admin/admin.php?page=ns-custom-placeholder-image-for-woocommerce/ns-admin-options/ns_admin_option_dashboard.php3.3237.44
How to install premium version /wp-admin/admin.php?page=how-to-install-premium-version3.2845.47

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

NS Custom Placeholder Image for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲25714.71 ▼0.062.02 ▲0.0439.60 ▼4.61
Dashboard /wp-admin2,358 ▲1706.52 ▲1.64132.87 ▲16.6596.06 ▲54.81
Posts /wp-admin/edit.php2,279 ▲1903.36 ▲1.3354.16 ▲16.5966.55 ▲34.78
Add New Post /wp-admin/post-new.php1,550 ▲2218.19 ▼0.13589.63 ▼74.4541.32 ▼14.95
Media Library /wp-admin/upload.php1,418 ▲304.12 ▼0.1383.58 ▼26.6077.59 ▲34.37
/wp-admin/admin.php?page=plugineye2441,0773.0539.6055.73
Placeholder /wp-admin/admin.php?page=ns-custom-placeholder-image-for-woocommerce/ns-admin-options/ns_admin_option_dashboard.php1,56810.21300.3896.13
How to install premium version /wp-admin/admin.php?page=how-to-install-premium-version6941.7210.9918.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=how-to-install-premium-version
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-custom-placeholder-image-for-woocommerce/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Settings Custom Placeholder Image.), #2 (View shop page after new image.), #3 (View single product after new image.)
You can look at the official readme.txt

ns-custom-placeholder-image-for-woocommerce/ns-custom-placeholder-image-page.php 92% from 13 tests

"NS Custom Placeholder Image for WooCommerce" version 1.3.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ns-custom-placeholder-image-for-woocommerce.php" instead of "ns-custom-placeholder-image-page.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,071 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1182191597
CSS3288345
PO File1222272
JavaScript216057

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods526.32%
▷ Protected methods00.00%
▷ Private methods1473.68%
Functions19
▷ Named functions947.37%
▷ Anonymous functions1052.63%
Constants2
▷ Global constants2100.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
7 PNG files occupy 0.15MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ns-admin-options/img/ns_banner_membership-500.png24.95KB26.27KB0.00%
screenshot-2.png45.48KB14.54KB▼ 68.03%
screenshot-1.png24.40KB7.43KB▼ 69.54%
ns-admin-options/img/ns-theme-promo.png29.37KB8.96KB▼ 69.50%
ns-admin-options/img/placeholder.png2.75KB2.92KB0.00%