84% noveldesign-store-directory

Code Review | The Novel Design Store Directory

WordPress plugin The Novel Design Store Directory scored84%from 54 tests.

About plugin

  • Plugin page: noveldesign-store...
  • Plugin version: 3.9.3
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: Sep 21, 2020
  • Latest release: Nov 14, 2023
  • Number of updates: 48
  • Update frequency: every 24.4 days
  • Top authors: noveldesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.53ms] Passed 4 tests

Analyzing server-side resources used by The Novel Design Store Directory
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.59 ▼6.94
Dashboard /wp-admin3.40 ▲0.0551.20 ▼10.44
Posts /wp-admin/edit.php3.51 ▲0.1653.50 ▲7.92
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.11 ▼15.92
Media Library /wp-admin/upload.php3.30 ▲0.0733.94 ▲3.19
Add New /wp-admin/post-new.php?post_type=wp_shops3.4345.86
Settings /wp-admin/edit.php?post_type=wp_shops&page=licence3.3937.66
All Shops /wp-admin/edit.php?post_type=wp_shops3.3734.28
Categories /wp-admin/edit-tags.php?taxonomy=categories&post_type=wp_shops3.4440.42
Import / Export /wp-admin/edit.php?post_type=wp_shops&page=shop-csv3.3434.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Novel Design Store Directory
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,144 ▲39714.93 ▲0.555.23 ▲3.6137.06 ▼5.85
Dashboard /wp-admin2,458 ▲2806.31 ▲0.59115.71 ▲0.8140.36 ▼7.92
Posts /wp-admin/edit.php2,321 ▲2213.49 ▲1.5355.36 ▲18.0636.59 ▲2.79
Add New Post /wp-admin/post-new.php1,581 ▲4723.18 ▼1.91680.98 ▲23.8337.26 ▼41.67
Media Library /wp-admin/upload.php1,467 ▲674.44 ▲0.2585.42 ▼12.1142.90 ▲1.32
Add New /wp-admin/post-new.php?post_type=wp_shops2,7467.96199.0473.85
Settings /wp-admin/edit.php?post_type=wp_shops&page=licence1,3903.1248.0133.29
All Shops /wp-admin/edit.php?post_type=wp_shops1,3023.5052.1830.16
Categories /wp-admin/edit-tags.php?taxonomy=categories&post_type=wp_shops1,4733.2748.4830.61
Import / Export /wp-admin/edit.php?post_type=wp_shops&page=shop-csv1,0683.1737.4525.44

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/noveldesign-store-directory/views/admin-csv.php:81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/noveldesign-store-directory/views/search-store-template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/noveldesign-store-directory/views/licence.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/noveldesign-store-directory/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/noveldesign-store-directory/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/noveldesign-store-directory/views/single-wp_shops.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/noveldesign-store-directory/views/single-wp_shop.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/noveldesign-store-directory/views/list-store-template.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 to be fixed: Please take inspiration from this readme.txt

noveldesign-store-directory/noveldesign-store-directory.php Passed 13 tests

"The Novel Design Store Directory" version 3.9.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
63 characters long description:
A store directory plugin to manage shopping centre’s tenants.

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 plugin8,192 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript68151,1824,829
PHP8541261,718
CSS63311001,612
SVG20133

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity31.00
▷ Minimum class complexity8.00
▷ Maximum class complexity54.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_777620_256x240.png4.52KB4.18KB▼ 7.58%
css/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%
images/time.png15.21KB10.07KB▼ 33.81%
css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
css/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%