84% nc-grid-list-view-for-woocommerce

Code Review | NC Grid List View for woocommerce

WordPress plugin NC Grid List View for woocommerce scored 84% from 54 tests.

About plugin

  • Plugin page: nc-grid-list-view...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Aug 12, 2016
  • Number of updates: 17
  • Update frequency: every 14.9 days
  • Top authors: Crispweb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 3,876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.13ms] Passed 4 tests

Server-side resources used by NC Grid List View for woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.29 ▲1.90
Dashboard /wp-admin3.31 ▲0.0143.65 ▼6.97
Posts /wp-admin/edit.php3.37 ▲0.0149.14 ▲2.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.85 ▼5.10
Media Library /wp-admin/upload.php3.24 ▲0.0136.79 ▲1.66

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for NC Grid List View for woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.36 ▲0.222.05 ▲0.3343.81 ▲1.93
Dashboard /wp-admin2,206 ▲155.77 ▲0.8795.45 ▼6.7737.75 ▼5.35
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0041.33 ▲7.0236.47 ▲1.67
Add New Post /wp-admin/post-new.php1,529 ▲1518.73 ▲1.22656.09 ▼15.2063.57 ▲10.74
Media Library /wp-admin/upload.php1,382 ▼64.24 ▼0.0097.45 ▼8.2944.08 ▼2.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nc-grid-list-view-for-woocommerce/admin/includes/nc-ajax-grid-list-view-for-woocommerce-settings-form.php:17

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: grid view products, grid and list view woocommerce, list view, grid and list view products, grid view...

nc-grid-list-view-for-woocommerce/nc-grid-list-view-for-woocommerce.php Passed 13 tests

The entry point to "NC Grid List View for woocommerce" version 1.0.1 is a PHP file that has certain tags in its header comment area
78 characters long description:
This plugin allow you to add list and grid view to your woocommerce shop page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected413 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP11168532355
JavaScript28135
CSS13423

PHP code Passed 2 tests

Analyzing 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.17
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions4100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/list.png3.04KB0.40KB▼ 86.71%
public/images/grid.png2.78KB0.12KB▼ 95.68%