84% regenerate-download-permissions-for-orders

Code Review | Regenerate Download Permissions for Orders

WordPress plugin Regenerate Download Permissions for Orders scored 84% from 54 tests.

About plugin

  • Plugin page: regenerate-downlo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 10, 2022
  • Latest release: Sep 10, 2022
  • Number of updates: 7
  • Update frequency: every 28.4 days
  • Top authors: hamedfuladi (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active / 909 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
Install script ran successfully

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

An overview of server-side resources used by Regenerate Download Permissions for Orders
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0241.10 ▲0.90
Dashboard /wp-admin3.32 ▲0.0244.49 ▼6.53
Posts /wp-admin/edit.php3.37 ▲0.0143.02 ▼5.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.62 ▼5.26
Media Library /wp-admin/upload.php3.24 ▲0.0133.76 ▼2.46

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Regenerate Download Permissions for Orders
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6814.74 ▲0.362.11 ▲0.2244.21 ▼0.75
Dashboard /wp-admin2,206 ▲324.84 ▼1.03101.44 ▼6.6436.68 ▼7.34
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0337.54 ▼7.6336.38 ▼0.66
Add New Post /wp-admin/post-new.php1,534 ▼823.06 ▲4.70642.10 ▼5.8359.84 ▲7.95
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.0197.13 ▼5.2543.86 ▲1.33

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/regenerate-download-permissions-for-orders/woo-regenerate-download-permissions.php

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 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
The official readme.txt is a good inspiration

regenerate-download-permissions-for-orders/woo-regenerate-download-permissions.php 92% from 13 tests

Analyzing the main PHP file in "Regenerate Download Permissions for Orders" version 1.0.0
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("regenerate-download-permissions-for-orders.php" instead of "woo-regenerate-download-permissions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin74 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171074

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin