66% listing-smart-shopping-campaign-for-google

Code Review | Listing & Smart Shopping Campaign for Google

WordPress plugin Listing & Smart Shopping Campaign for Google scored 66% from 54 tests.

About plugin

  • Plugin page: listing-smart-sho...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Dec 24, 2021
  • Latest release: Mar 24, 2023
  • Number of updates: 8
  • Update frequency: every 57.8 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 410 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.44ms] Passed 4 tests

Analyzing server-side resources used by Listing & Smart Shopping Campaign for Google
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1137.97 ▼5.73
Dashboard /wp-admin3.38 ▲0.0843.97 ▼4.78
Posts /wp-admin/edit.php3.43 ▲0.0848.24 ▼6.27
Add New Post /wp-admin/post-new.php5.96 ▲0.0890.21 ▼8.99
Media Library /wp-admin/upload.php3.31 ▲0.0866.03 ▲30.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 115 new files
Database: 1 new table, 6 new options
New tables
wp_google_shopping_product_upload_status
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Listing & Smart Shopping Campaign for Google: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▼1013.17 ▲0.011.78 ▼0.3844.90 ▼1.74
Dashboard /wp-admin2,209 ▲35.83 ▲0.9698.32 ▼4.6536.36 ▼4.39
Posts /wp-admin/edit.php2,089 ▼02.06 ▼0.0039.71 ▲1.0734.07 ▼0.77
Add New Post /wp-admin/post-new.php1,533 ▲1321.07 ▼2.07694.70 ▼83.6751.01 ▼4.70
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.03128.45 ▲27.5454.09 ▲0.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_google_shopping_product_upload_status
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/dashboard/listing-and-smart-shopping-campaign-for-google-dashboard-faq.php
  • 30× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/dashboard/listing-and-smart-shopping-campaign-for-google-dashboard-configuration.php:2
    • > PHP Warning
      require(CED_WGEI_DIRPATHadmin/lib/listing-and-smart-shopping-campaign-for-google-lib.php): failed to open stream: No such file or directory in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/dashboard/listing-and-smart-shopping-campaign-for-google-dashboard-googleads.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/translation-install.php): failed to open stream: No such file or directory in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/partials/listing-and-smart-shopping-campaign-for-google-googleConfiguration.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/partials/listing-and-smart-shopping-campaign-for-google-admin-display.php:15
    • > PHP Warning
      require(CED_WGEI_DIRPATHadmin/lib/listing-and-smart-shopping-campaign-for-google-lib.php): failed to open stream: No such file or directory in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/dashboard/listing-and-smart-shopping-campaign-for-google-dashboard-setting.php on line 2
    • > PHP Warning
      Use of undefined constant CED_WGEI_DIRPATH - assumed 'CED_WGEI_DIRPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/dashboard/listing-and-smart-shopping-campaign-for-google-dashboard-setting.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'CED_WGEI_DIRPATHadmin/lib/listing-and-smart-shopping-campaign-for-google-lib.php' (include_path='.:/usr/share/php') in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/dashboard/listing-and-smart-shopping-campaign-for-google-dashboard-googleads.php on line 3
    • > PHP Warning
      Use of undefined constant CED_WGEI_DIRPATH - assumed 'CED_WGEI_DIRPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/dashboard/listing-and-smart-shopping-campaign-for-google-dashboard-googleads.php on line 3
    • > PHP Warning
      require(CED_WGEI_DIRPATHadmin/lib/listing-and-smart-shopping-campaign-for-google-lib.php): failed to open stream: No such file or directory in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/partials/listing-and-smart-shopping-campaign-for-google-googleAdds.php on line 3
    • > PHP Warning
      Use of undefined constant CED_WGEI_DIRPATH - assumed 'CED_WGEI_DIRPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/listing-smart-shopping-campaign-for-google/admin/partials/listing-and-smart-shopping-campaign-for-google-googleAdds.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #10 (Google Ads), #11 (Conversions), #12 (Reporting), #13 (Profile), #14 (Reconnect Account), #15 (Merchant Center), #16 (Activities), #17 (FAQ and Support)
You can look at the official readme.txt

listing-smart-shopping-campaign-for-google/listing-and-smart-shopping-campaign-for-google.php 62% from 13 tests

The primary PHP file in "Listing & Smart Shopping Campaign for Google" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.6" instead of "3.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("listing-smart-shopping-campaign-for-google.php" instead of "listing-and-smart-shopping-campaign-for-google.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • 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 review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected19,490 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP3497783110,715
CSS14032336,392
JavaScript11281082,381
JSON1001
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity58.56
▷ Minimum class complexity1.00
▷ Maximum class complexity387.00
Average method complexity6.51
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods94
▷ Static methods33.19%
▷ Public methods8893.62%
▷ Protected methods11.06%
▷ Private methods55.32%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
61 PNG files occupy 0.77MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/support.png0.73KB0.80KB0.00%
admin/images/check-new.png2.14KB0.88KB▼ 59.09%
admin/images/home.png6.64KB4.35KB▼ 34.52%
admin/images/Creative.png366.04KB115.62KB▼ 68.41%
admin/images/logo.png158.63KB55.59KB▼ 64.96%