10% now-in-store-catalog-builder

Code Review | WooCommerce - Automatic Catalog Maker

WordPress plugin WooCommerce - Automatic Catalog Maker scored10%from 54 tests.

About plugin

  • Plugin page: now-in-store-cata...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2015
  • Latest release: Feb 18, 2021
  • Number of updates: 25
  • Update frequency: every 81.2 days
  • Top authors: nowinstore (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /16,311 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Error in wp-content/plugins/now-in-store-catalog-builder/nowinstore.php+89
    Uncaught Error: Call to undefined function wc_rand_hash() in wp-content/plugins/now-in-store-catalog-builder/nowinstore.php:89
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): NowInStore_CatalogBuilder->plugin_activate()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

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

An overview of server-side resources used by WooCommerce - Automatic Catalog Maker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.49 ▼1.16
Dashboard /wp-admin3.31 ▲0.0045.65 ▼5.83
Posts /wp-admin/edit.php3.36 ▲0.0046.14 ▼1.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.18 ▼10.37
Media Library /wp-admin/upload.php3.23 ▲0.0034.75 ▲1.84

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WooCommerce - Automatic Catalog Maker: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.305.09 ▲3.0838.13 ▼7.55
Dashboard /wp-admin2,209 ▲215.86 ▲0.9798.79 ▼20.0741.94 ▼5.92
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0538.95 ▼0.2638.65 ▲3.65
Add New Post /wp-admin/post-new.php1,420 ▼10820.25 ▼3.13569.32 ▼137.5847.88 ▼6.57
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0697.83 ▲3.7144.26 ▲3.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
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 register_activation_hook() in wp-content/plugins/now-in-store-catalog-builder/nowinstore.php:15

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 83% from 29 tests

readme.txt 75% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
  • Screenshots: Add descriptions for screenshots #4, #5 in now-in-store-catalog-builder/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === now-in-store-catalog-builder === )
The official readme.txt is a good inspiration

now-in-store-catalog-builder/nowinstore.php 92% from 13 tests

The entry point to "WooCommerce - Automatic Catalog Maker" version 2.1.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("now-in-store-catalog-builder.php" instead of "nowinstore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected102 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11515102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ic-nowinstore-small.png1.56KB0.62KB▼ 60.52%
images/ic-nowinstore-large.png15.26KB6.03KB▼ 60.45%