84% auto-product-restock

Code Review | Auto Product Restock

WordPress plugin Auto Product Restock scored84%from 54 tests.

About plugin

  • Plugin page: auto-product-restock
  • Plugin version: 1.01
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 6.3.1
  • First release: Apr 9, 2020
  • Latest release: Apr 10, 2020
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: nerdywp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /683 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Auto Product Restock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.12 ▼8.81
Dashboard /wp-admin3.31 ▲0.0143.67 ▼4.91
Posts /wp-admin/edit.php3.37 ▲0.0143.83 ▼3.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.32 ▼6.61
Media Library /wp-admin/upload.php3.24 ▲0.0135.78 ▲4.79

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Auto Product Restock
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.61 ▼0.621.74 ▼0.0941.27 ▼2.88
Dashboard /wp-admin2,206 ▲185.90 ▲0.09111.37 ▼6.6744.12 ▲1.22
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0636.26 ▼2.3032.36 ▼8.34
Add New Post /wp-admin/post-new.php1,533 ▼023.37 ▼0.08676.91 ▲53.7753.78 ▲2.55
Media Library /wp-admin/upload.php1,382 ▼94.29 ▲0.1096.77 ▼4.7540.83 ▼2.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-product-restock/apr.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: restock, woocommerce, ecommerce

auto-product-restock/apr.php 92% from 13 tests

The entry point to "Auto Product Restock" version 1.01 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("auto-product-restock.php" instead of "apr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected127 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12419114
JavaScript12013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin