78% growanizer

Code Review | Growanizer

WordPress plugin Growanizer scored78%from 54 tests.

About plugin

  • Plugin page: growanizer
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8.0
  • WordPress version: 6.3.1
  • First release: Jul 29, 2021
  • Latest release: Sep 7, 2021
  • Number of updates: 10
  • Update frequency: every 4.1 days
  • Top authors: custom4web (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /567 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 successfully, without throwing any errors or notices

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

Server-side resources used by Growanizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.47 ▼1.72
Dashboard /wp-admin3.31 ▲0.0149.36 ▼5.11
Posts /wp-admin/edit.php3.42 ▲0.0750.83 ▲1.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.01 ▲4.70
Media Library /wp-admin/upload.php3.23 ▲0.0040.82 ▲1.19

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 158 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Growanizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.62 ▼0.0841.08 ▼0.36
Dashboard /wp-admin2,195 ▲185.62 ▼0.2290.60 ▼2.1440.78 ▼3.40
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0940.71 ▼1.0136.65 ▼0.67
Add New Post /wp-admin/post-new.php1,526 ▼023.01 ▼0.73678.09 ▲50.1357.16 ▼8.65
Media Library /wp-admin/upload.php1,391 ▼94.24 ▲0.06104.91 ▼5.0344.87 ▼1.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/growanizer/modules/growanizer-block-attributes/admin/views/renderer/html-shortcode_content.php
    • > /wp-content/plugins/growanizer/assets/modal/pro-modal.php
    • > /wp-content/plugins/growanizer/modules/growanizer-product-finder/admin/views/renderer/html-shortcode_content.php
  • 36× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/growanizer/modules/growanizer-related-products/admin/views/renderer/html-decimal-values.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/growanizer/modules/growanizer-related-products/admin/views/html-rule-location.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/growanizer/modules/growanizer-related-products/templates/linked-products.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/growanizer/modules/growanizer-related-products/admin/views/renderer/html-chooser.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/growanizer/admin/views/general-tabs/modules.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Growanizer_Product_Finder' not found in wp-content/plugins/growanizer/modules/growanizer-product-finder/templates/growpf-suggestions-template.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/growanizer/modules/growanizer-related-products/admin/views/renderer/html-number.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/growanizer/modules/growanizer-product-finder/admin/views/renderer/html-hidden.php:2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/growanizer/modules/growanizer-product-finder/admin/views/renderer/html-shortcode_content.php on line 11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/growanizer/modules/growanizer-product-finder/admin/views/html-rule-default.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7, #8, #9 in growanizer/assets to your readme.txt
The official readme.txt is a good inspiration

growanizer/growanizer.php 85% from 13 tests

The main PHP file in "Growanizer" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.5" instead of "3.0.0")
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected28,856 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP721,14656010,417
SVG3009,546
JavaScript169351,1045,308
CSS193811742,756
JSON210829

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity28.87
▷ Minimum class complexity1.00
▷ Maximum class complexity174.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes31
▷ Abstract classes26.45%
▷ Concrete classes2993.55%
▷ Final classes13.45%
Methods329
▷ Static methods4012.16%
▷ Public methods29689.97%
▷ Protected methods267.90%
▷ Private methods72.13%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants38
▷ Global constants37.89%
▷ Class constants3592.11%
▷ Public constants35100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/lock.png0.58KB0.47KB▼ 20.20%
modules/growanizer-related-products/assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/css/chosen/chosen-sprite.png0.53KB0.88KB0.00%
modules/growanizer-related-products/assets/css/chosen-sprite.png0.53KB0.88KB0.00%
modules/growanizer-product-finder/assets/images/spinner.png19.95KB6.29KB▼ 68.47%