84% fetchapp-for-woocommerce

Code Review | FetchApp

WordPress plugin FetchApp scored84%from 54 tests.

About plugin

  • Plugin page: fetchapp-for-wooc...
  • Plugin version: 1.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 29, 2013
  • Latest release: Mar 1, 2023
  • Number of updates: 66
  • Update frequency: every 52.6 days
  • Top authors: prcapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,272 total downloads


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

Analyzing server-side resources used by FetchApp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.61 ▲0.95
Dashboard /wp-admin3.31 ▲0.0044.61 ▼9.74
Posts /wp-admin/edit.php3.36 ▲0.0043.23 ▼8.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.00 ▼6.54
Media Library /wp-admin/upload.php3.23 ▲0.0037.17 ▲1.22

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress 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 /2,789 ▲2814.21 ▼0.201.62 ▼0.0238.89 ▼1.26
Dashboard /wp-admin2,198 ▲305.62 ▲0.1081.44 ▼11.6338.24 ▼1.97
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0234.54 ▼0.3730.16 ▼7.72
Add New Post /wp-admin/post-new.php1,526 ▼324.00 ▲0.86637.74 ▼64.6454.60 ▲4.25
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0798.36 ▲3.2141.72 ▼0.05

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FetchApp\\Tests\\FetchAppBaseTest' not found in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/tests/ProductTest.php:11
    • > PHP Warning
      include_once(): Failed opening 'EnumEmulator.class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/src/FetchApp/API/FileType.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/tests/FetchAppBaseTest.php:14
    • > PHP Warning
      include_once(EnumEmulator.class.php): failed to open stream: No such file or directory in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/src/FetchApp/API/FileType.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'FetchApp\\Tests\\FetchAppBaseTest' not found in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/tests/OrderItemTest.php:10
    • > 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 Fatal error
      Uncaught Error: Class 'FetchApp\\API\\EnumEmulator' not found in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/src/FetchApp/API/OrderStatus.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'FetchApp\\Tests\\FetchAppBaseTest' not found in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/tests/AccountTest.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/fetchapp-for-woocommerce/fetchapp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FetchApp\\Tests\\FetchAppBaseTest' not found in wp-content/plugins/fetchapp-for-woocommerce/libraries/fetchapp-php-2.0/tests/APITest.php:7

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


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.9.2, 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,953 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code

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.16
Average class complexity12.71
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes729.17%
▷ Static methods195.85%
▷ Public methods325100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants18100.00%
▷ Public constants18100.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%