94% fetchapp-for-woocommerce

Code Review | FetchApp

WordPress plugin FetchApp scored 94% from 54 tests.

About plugin

  • Plugin page: fetchapp-for-wooc...
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.6
  • WordPress version: 5.8.1
  • First release: Aug 29, 2013
  • Latest release: Jan 28, 2021
  • Number of updates: 62
  • Update frequency: every 43.7 days
  • Top authors: prcapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 3,659 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼181.65ms] Passed 4 tests

Analyzing server-side resources used by FetchApp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.53 ▲15.81
Dashboard /wp-admin3.06 ▲0.0142.62 ▼5.81
Posts /wp-admin/edit.php3.11 ▲0.0044.46 ▼0.38
Add New Post /wp-admin/post-new.php5.42 ▼0.0283.92 ▼709.48
Media Library /wp-admin/upload.php3.00 ▲0.0032.03 ▼10.92

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for FetchApp
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.97 ▲0.4111.76 ▼1.4747.89 ▲1.76
Dashboard /wp-admin2,973 ▲395.99 ▲0.04166.97 ▲12.35109.10 ▼8.96
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0164.37 ▼0.5587.60 ▲0.28
Add New Post /wp-admin/post-new.php1,683 ▲18318.52 ▼0.06400.22 ▼49.00108.09 ▼17.39
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.03154.05 ▲0.19115.32 ▼1.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fetchapp-for-woocommerce/zz_fetchappwp_carts/fetchappbase.class.php:13
    • > PHP Warning
      Declaration of FetchApp\\API\\FileType::getOptions() should be compatible with FetchApp\\API\\EnumEmulator::getOptions($className) in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/src/FileType.class.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/fetchapp-for-woocommerce/fetchapp.php:13
    • > PHP Warning
      Declaration of FetchApp\\API\\FileType::getName($const) should be compatible with FetchApp\\API\\EnumEmulator::getName($const, $className) in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/src/FileType.class.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'FetchApp\\API\\EnumEmulator' not found in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/src/OrderStatus.class.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fetchapp-for-woocommerce/zz_fetchappwp_carts/wc_fetchapp.class.php:13
    • > PHP Warning
      Declaration of FetchApp\\API\\FileType::getValue($name) should be compatible with FetchApp\\API\\EnumEmulator::getValue($name, $className) in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/src/FileType.class.php on line 42

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === fetchapp-for-woocommerce === )
The official readme.txt is a good inspiration

fetchapp-for-woocommerce/fetchapp.php 92% from 13 tests

This is the main PHP file of "FetchApp" version 1.8.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fetchapp-for-woocommerce.php" instead of "fetchapp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,107 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP176471,2212,474
Markdown21280633

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 complexity14.62
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods261
▷ Static methods176.51%
▷ Public methods261100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png2.24KB0.76KB▼ 65.98%