89% grant-download-permissions-for-past-shop-orders

Code Review | Grant download permissions for past shop orders

WordPress plugin Grant download permissions for past shop orders scored89%from 54 tests.

About plugin

  • Plugin page: grant-download-pe...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2022
  • Latest release: Dec 30, 2022
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: codersmutant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Grant download permissions for past shop orders
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.83 ▼3.36
Dashboard /wp-admin3.33 ▼0.0252.80 ▼10.83
Posts /wp-admin/edit.php3.38 ▲0.0248.73 ▼0.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.65 ▼14.94
Media Library /wp-admin/upload.php3.25 ▲0.0237.15 ▲1.64

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Grant download permissions for past shop orders
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.28 ▼0.282.04 ▲0.3047.25 ▲0.82
Dashboard /wp-admin2,198 ▲215.56 ▼0.0494.58 ▼3.0345.11 ▲2.08
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0337.36 ▲0.9736.67 ▲0.46
Add New Post /wp-admin/post-new.php1,526 ▼223.63 ▲0.73640.28 ▼32.5155.29 ▲0.48
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.0296.93 ▼9.0641.84 ▼2.86

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Install the plugin.)
You can look at the official readme.txt

grant-download-permissions-for-past-shop-orders/permissions-for-past-shop-orders.php 92% from 13 tests

The main PHP file in "Grant download permissions for past shop orders" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("grant-download-permissions-for-past-shop-orders.php" instead of "permissions-for-past-shop-orders.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1164558

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.84
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity6.00
▷ Minimum method complexity2.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions0
▷ Named functions00.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
No PNG files were detected