88% competitive-pricing-for-wc-and-gs

Code Review | Competitive Pricing for WooCommerce and Google Shopping

WordPress plugin Competitive Pricing for WooCommerce and Google Shopping scored88%from 54 tests.

About plugin

  • Plugin page: competitive-prici...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: May 8, 2020
  • Latest release: Jul 30, 2020
  • Number of updates: 30
  • Update frequency: every 2.8 days
  • Top authors: repupress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /698 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Competitive Pricing for WooCommerce and Google Shopping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1440.51 ▲1.32
Dashboard /wp-admin3.43 ▲0.1245.06 ▼3.41
Posts /wp-admin/edit.php3.54 ▲0.1950.15 ▲2.73
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.14 ▼6.28
Media Library /wp-admin/upload.php3.35 ▲0.1238.98 ▲7.08

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 12 new options
New WordPress options
widget_theysaidso_widget
api_pp_search
widget_recent-comments
api_pp_automation_status
theysaidso_admin_options
api_pp_total_products_start
api_pp_automation_count
can_compress_scripts
api_pp_automation_all
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Competitive Pricing for WooCommerce and Google Shopping
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.11 ▼1.271.80 ▼0.2542.08 ▼2.17
Dashboard /wp-admin2,206 ▲156.09 ▲1.0596.94 ▼19.0639.52 ▼6.89
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0540.80 ▲3.6835.29 ▲0.82
Add New Post /wp-admin/post-new.php1,537 ▲1523.19 ▲0.22689.21 ▲53.6651.98 ▲3.73
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.1096.44 ▼7.2045.15 ▲2.82

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 12 options in the database
    • api_pp_automation_count
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • api_pp_automation_status
    • widget_recent-comments
    • can_compress_scripts
    • api_pp_automation_start_time
    • api_pp_total_products_start
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

competitive-pricing-for-wc-and-gs/competitive-pricing-for-woocommerce.php 69% from 13 tests

The main PHP script in "Competitive Pricing for WooCommerce and Google Shopping" version 1.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: The description should be shorter than 140 characters (currently 155 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("competitive-pricing-for-wc-and-gs.php" instead of "competitive-pricing-for-woocommerce.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

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
Everything looks great! No dangerous files found in this plugin1,216 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10123821,216

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.42MB with 0.29MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/reviews.png66.12KB29.29KB▼ 55.70%
(invalid) assets/pricing.png305.49KB0.00KB▼ 100.00%
assets/videos.png56.50KB25.72KB▼ 54.48%