84% storepredictor

Code Review | storePredictor

WordPress plugin storePredictor scored84%from 54 tests.

About plugin

  • Plugin page: storepredictor
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Oct 27, 2022
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: storepredictor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /761 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.84ms] Passed 4 tests

Server-side resources used by storePredictor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.18 ▼1.67
Dashboard /wp-admin3.33 ▲0.0248.28 ▼7.14
Posts /wp-admin/edit.php3.38 ▲0.0251.27 ▲4.95
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.64 ▼2.71
Media Library /wp-admin/upload.php3.25 ▲0.0236.71 ▲4.17

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by storePredictor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.67 ▼0.601.78 ▼0.2044.30 ▲0.62
Dashboard /wp-admin2,209 ▲184.87 ▼0.00102.70 ▼2.3938.60 ▲1.07
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0740.99 ▼0.9835.18 ▼2.38
Add New Post /wp-admin/post-new.php1,520 ▲123.06 ▼0.05665.21 ▲59.2461.48 ▲9.43
Media Library /wp-admin/upload.php1,391 ▲64.27 ▲0.0898.61 ▼2.1041.00 ▼4.38

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 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/storepredictor/woocommerce-storepredictor-plugin.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/storepredictor/class-wc-storepredictor-integration.php:10

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screen2.png), #2 (screen3.png)
You can take inspiration from this readme.txt

storepredictor/woocommerce-storepredictor-plugin.php 92% from 13 tests

The primary PHP file in "storePredictor" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("storepredictor.php" instead of "woocommerce-storepredictor-plugin.php")

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
There were no executable files found in this plugin142 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22954142

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected