77% muzaara-google-content-api-data-feed

Code Review | Muzaara Content API Google Data Feed

WordPress plugin Muzaara Content API Google Data Feed scored 77% from 54 tests.

About plugin

  • Plugin page: muzaara-google-co...
  • Plugin version: 1.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 5.8.1
  • First release: Apr 9, 2021
  • Latest release: Oct 11, 2021
  • Number of updates: 50
  • Update frequency: every 3.7 days
  • Top authors: muzaara (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,890 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Muzaara Content API Google Data Feed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1228.45 ▲6.24
Dashboard /wp-admin3.06 ▲0.0042.17 ▲1.70
Posts /wp-admin/edit.php3.11 ▲0.0043.42 ▲1.67
Add New Post /wp-admin/post-new.php5.42 ▼0.0182.72 ▼554.21
Media Library /wp-admin/upload.php3.00 ▼0.0131.75 ▼4.59

Server storage [IO: ▲29.12MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Total filesystem usage should be limited to 25MB (currently using 29.12MB)
Filesystem: 6,389 new files
Database: no new tables, 1 new option
New WordPress options
muzaara_plugins

Browser metrics Passed 4 tests

Muzaara Content API Google Data Feed: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.25 ▲0.728.42 ▼1.3545.63 ▼2.76
Dashboard /wp-admin2,970 ▲365.91 ▼0.26135.71 ▼6.19115.47 ▲3.31
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0065.45 ▼0.7391.34 ▲3.33
Add New Post /wp-admin/post-new.php1,604 ▲10418.84 ▲0.19367.80 ▲8.02104.39 ▼3.52
Media Library /wp-admin/upload.php1,807 ▼35.01 ▲0.01142.83 ▼2.42117.01 ▲3.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • muzaara_plugins

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/muzaara-google-content-api-data-feed/lib/muzaara/lib/google-ads-php/scripts/print_php_information.php
  • 3573× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/muzaara-google-content-api-data-feed/src/lib/muzaara/lib/google-api-php-client-2.8.3/vendor/google/apiclient-services/src/Google/Service/ShoppingContent/OrderDeliveryDetails.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/muzaara-google-content-api-data-feed/lib/muzaara/lib/google-ads-php/src/Google/Ads/GoogleAds/V8/Services/MutateFeedMappingsResponse.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/muzaara-google-content-api-data-feed/src/lib/muzaara/lib/google-api-php-client-2.8.3/vendor/google/apiclient-services/src/Google/Service/ShoppingContent/ListAccountLabelsResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/muzaara-google-content-api-data-feed/src/lib/muzaara/lib/google-api-php-client-2.8.3/vendor/google/apiclient-services/src/Google/Service/ShoppingContent/ShipmentTrackingInfo.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/muzaara-google-content-api-data-feed/src/lib/muzaara/lib/google-api-php-client-2.8.3/vendor/google/apiclient-services/src/Google/Service/ShoppingContent/OrderMerchantProvidedAnnotation.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/muzaara-google-content-api-data-feed/lib/muzaara/lib/google-ads-php/src/Google/Ads/GoogleAds/V8/Services/PromoteCampaignDraftRequest.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Google\\Auth\\FetchAuthTokenInterface' not found in wp-content/plugins/muzaara-google-content-api-data-feed/src/lib/muzaara/lib/google-api-php-client-2.8.3/vendor/google/auth/src/OAuth2.php:36
    • > PHP Fatal error
      Trait 'Google\\ApiCore\\GapicClientTrait' not found in wp-content/plugins/muzaara-google-content-api-data-feed/lib/muzaara/lib/google-ads-php/src/Google/Ads/GoogleAds/V8/Services/Gapic/MobileDeviceConstantServiceGapicClient.php on line 61
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/muzaara-google-content-api-data-feed/lib/muzaara/lib/google-api-php-client/vendor/google/apiclient-services/src/ShoppingContent/DatafeedStatus.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/muzaara-google-content-api-data-feed/lib/muzaara/lib/google-ads-php/src/Google/Ads/GoogleAds/V8/Services/MutateExtensionFeedItemResult.php:16

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)
No browser errors were detected

Optimizations

Plugin configuration 90% 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:
  • Screenshots: Please add an image for screenshot #1 (Connect your Google Ads Account)
Please take inspiration from this readme.txt

muzaara-google-content-api-data-feed/muzaara-product-feed.php 85% from 13 tests

The main file in "Muzaara Content API Google Data Feed" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("muzaara-google-content-api-data-feed.php" instead of "muzaara-product-feed.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected476,026 lines of code in 6,749 files:
LanguageFilesBlank linesComment linesLines of code
PHP6,47775,666312,561448,773
JSON1800015,888
Markdown542,95009,194
JavaScript1219221,496
YAML9391174
Python24450149
CSS1252124
XML701100
Protocol Buffers2143864
SVG10031
Bourne Shell24014
Dockerfile17410
make1409

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.56
▷ Minimum class complexity1.00
▷ Maximum class complexity660.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces600
Interfaces120
Traits49
Classes6,373
▷ Abstract classes2433.81%
▷ Concrete classes6,13096.19%
▷ Final classes981.60%
Methods33,552
▷ Static methods4,29712.81%
▷ Public methods31,29193.26%
▷ Protected methods7592.26%
▷ Private methods1,5024.48%
Functions695
▷ Named functions25837.12%
▷ Anonymous functions43762.88%
Constants5,942
▷ Global constants560.94%
▷ Class constants5,88699.06%
▷ Public constants5,82298.91%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.36MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/image/btn_google_signin.png7.81KB3.34KB▼ 57.22%
asset/image/btn_google_signin_focus.png8.28KB3.49KB▼ 57.82%
src/asset/image/btn_google_signin.png7.81KB3.34KB▼ 57.22%
src/asset/image/btn_google_signin_focus.png8.28KB3.49KB▼ 57.82%
asset/screenshot-1.png44.56KB14.10KB▼ 68.35%