89% bestprice-analytics-integration

Code Review | BestPrice Analytics Integration

WordPress plugin BestPrice Analytics Integration scored89%from 54 tests.

About plugin

  • Plugin page: bestprice-analyti...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2019
  • Latest release: Sep 22, 2023
  • Number of updates: 35
  • Update frequency: every 39.4 days
  • Top authors: bestpricegr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /7,295 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.07ms] Passed 4 tests

This is a short check of server-side resources used by BestPrice Analytics Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.96 ▲3.01
Dashboard /wp-admin3.32 ▲0.0244.24 ▼5.35
Posts /wp-admin/edit.php3.37 ▲0.0143.36 ▼6.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.69 ▼22.51
Media Library /wp-admin/upload.php3.24 ▲0.0134.95 ▼1.63

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BestPrice Analytics Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.011.74 ▲0.1744.33 ▲3.91
Dashboard /wp-admin2,209 ▲235.88 ▲0.98103.69 ▼6.9839.97 ▼4.94
Posts /wp-admin/edit.php2,086 ▼32.04 ▼0.0133.40 ▼9.0536.23 ▲1.85
Add New Post /wp-admin/post-new.php1,533 ▲1023.14 ▼0.23665.35 ▼51.3358.23 ▼1.64
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.00102.18 ▼15.0444.01 ▼2.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 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
4 plugin tags: woocommerce, analytics, 360, bestprice

bestprice-analytics-integration/ext-bestprice-analytics-integration.php 62% from 13 tests

The entry point to "BestPrice Analytics Integration" version 1.1.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0.0" instead of "3.8")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bestprice-analytics-integration.php" instead of "ext-bestprice-analytics-integration.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected400 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP391138306
PO File1252794

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity14.33
▷ Minimum class complexity7.00
▷ Maximum class complexity25.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1982.61%
▷ Protected methods417.39%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected