78% frenzy

Code Review | Fetch

WordPress plugin Fetch scored78%from 54 tests.

About plugin

  • Plugin page: frenzy
  • Plugin version: 3.6.0
  • PHP compatiblity: 5.4.45+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.2
  • WordPress version: 6.3.1
  • First release: May 31, 2018
  • Latest release: Aug 29, 2019
  • Number of updates: 73
  • Update frequency: every 6.3 days
  • Top authors: frenzylabs (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,858 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▲4.78ms] Passed 4 tests

An overview of server-side resources used by Fetch
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1940.84 ▼2.82
Dashboard /wp-admin3.45 ▲0.1548.15 ▼5.19
Posts /wp-admin/edit.php3.51 ▲0.15109.18 ▲55.60
Add New Post /wp-admin/post-new.php6.03 ▲0.15109.53 ▲18.54
Media Library /wp-admin/upload.php3.32 ▲0.0943.26 ▲8.57
Fetch Products /wp-admin/edit-tags.php?taxonomy=fetch-product&post_type=attachment3.4654.97
Fetch /wp-admin/options-general.php?page=fetch-settings-submenu3.3333.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 116 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Fetch: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲21513.66 ▼0.998.43 ▲6.4241.86 ▲3.46
Dashboard /wp-admin2,239 ▲485.85 ▲0.94114.15 ▲12.7975.42 ▲33.68
Posts /wp-admin/edit.php2,122 ▲302.00 ▲0.0059.81 ▲19.17109.04 ▲67.54
Add New Post /wp-admin/post-new.php1,580 ▲3821.75 ▲3.67763.50 ▲153.8844.75 ▼6.11
Media Library /wp-admin/upload.php1,427 ▲454.20 ▼0.02125.27 ▲29.8088.00 ▲47.56
Fetch Products /wp-admin/edit-tags.php?taxonomy=fetch-product&post_type=attachment1,2922.1327.3734.45
Fetch /wp-admin/options-general.php?page=fetch-settings-submenu1,0472.2531.7626.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=fetch-settings-submenu
    • > Notice in wp-content/plugins/frenzy/views/settings/account.php+123
    Undefined index: reset-token

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
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Frenzy\\PluginAPI\\AbstractSubscriber' not found in wp-content/plugins/frenzy/src/Subscriber/PublicScriptAssetSubscriber.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Frenzy\\plugin_dir_url() in wp-content/plugins/frenzy/frenzy.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/frenzy/views/templates/paypal-message.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Frenzy\\PluginAPI\\AbstractSubscriber' not found in wp-content/plugins/frenzy/src/Subscriber/SavePaypalSubscriber.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Frenzy\\Helpers\\HelperFunctions' not found in wp-content/plugins/frenzy/views/settings/account.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/frenzy/views/templates/product-additions-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Frenzy\\Inc\\FetchTaxonomy' not found in wp-content/plugins/frenzy/src/Inc/FetchTaxonomyFetchProduct.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Frenzy\\API\\Indi' not found in wp-content/plugins/frenzy/views/settings/analytics.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Frenzy\\PluginAPI\\AbstractSubscriber' not found in wp-content/plugins/frenzy/src/Subscriber/ScriptAssetSubscriber.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Frenzy\\PluginAPI\\AbstractSubscriber' not found in wp-content/plugins/frenzy/src/Subscriber/ToolsMenuSubscriber.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

frenzy/frenzy.php Passed 13 tests

The entry point to "Fetch" version 3.6.0 is a PHP file that has certain tags in its header comment area
84 characters long description:
Fetch automatically finds, matches, and tags brand-specific products in your images.

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
There were no executable files found in this plugin30,816 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72,6967,51211,809
JSON40010,953
PHP447851,5334,208
CSS6260802,087
Sass230861,707
XML210652

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.07
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes27
▷ Abstract classes27.41%
▷ Concrete classes2592.59%
▷ Final classes00.00%
Methods236
▷ Static methods4217.80%
▷ Public methods17574.15%
▷ Protected methods125.08%
▷ Private methods4920.76%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.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
35 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/shopsimilar-off.png0.45KB0.51KB0.00%
assets/images/savebutton(state1).png0.39KB0.55KB0.00%
assets/images/buy-button-on.png0.49KB0.49KB0.00%
assets/images/icon-left.png0.21KB0.21KB0.00%
assets/images/ItemImage_opaquemask.png0.14KB0.14KB0.00%