84% hm-digital-shop

Code Review | HM File Link Shop

WordPress plugin HM File Link Shop scored84%from 54 tests.

About plugin

  • Plugin page: hm-digital-shop
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2016
  • Latest release: Jan 14, 2016
  • Number of updates: 21
  • Update frequency: N/A
  • Top authors: hamedmoodi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /787 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.01MB] [CPU: ▼6.16ms] Passed 4 tests

This is a short check of server-side resources used by HM File Link Shop
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.79 ▼1.66
Dashboard /wp-admin3.34 ▼0.0148.34 ▼17.42
Posts /wp-admin/edit.php3.39 ▲0.0349.80 ▼3.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.64 ▼1.58
Media Library /wp-admin/upload.php3.26 ▲0.0337.99 ▲3.70
Settings /wp-admin/admin.php?page=hmds_digital_product_settings3.2534.25
Sell Download Link /wp-admin/admin.php?page=hmds_digital_product3.2734.60
Transactions /wp-admin/admin.php?page=hmds_digital_product_transactions3.2836.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for HM File Link Shop
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲5914.28 ▲0.011.92 ▼0.0841.63 ▼1.54
Dashboard /wp-admin2,223 ▲455.64 ▲0.0388.02 ▼29.2143.82 ▼1.93
Posts /wp-admin/edit.php2,134 ▲522.02 ▲0.0436.63 ▲1.0833.26 ▼3.58
Add New Post /wp-admin/post-new.php1,551 ▲2323.28 ▲0.13664.42 ▼30.3561.87 ▲0.92
Media Library /wp-admin/upload.php1,431 ▲344.20 ▲0.04100.42 ▼7.8551.36 ▲0.52
Settings /wp-admin/admin.php?page=hmds_digital_product_settings8182.0323.3727.07
Sell Download Link /wp-admin/admin.php?page=hmds_digital_product9271.8636.9226.69
Transactions /wp-admin/admin.php?page=hmds_digital_product_transactions8662.0024.7225.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/hm-digital-shop/admin/view/digital_product_settings_page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hm-digital-shop/admin/admin_proccess.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hm-digital-shop/admin/ajax_requests.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hm-digital-shop/inc/shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_rtl() in wp-content/plugins/hm-digital-shop/inc/email_template.php:2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/hm-digital-shop/admin/view/digital_product_transactions_page.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/hm-digital-shop/admin/view/digital_product_transactions_page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hm-digital-shop/admin/view/digital_product_page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Buy the file easily) image required
  • License uri: Invalid URI found ("www.gnu.org/licenses/old-licenses/gpl-2.0.en.html")
The official readme.txt might help

hm-digital-shop/hm-digital-shop.php Passed 13 tests

The main file in "HM File Link Shop" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
53 characters long description:
This plugin is way to sell download link with parspal

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
There were no executable files found in this plugin1,009 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP109544553
JavaScript36566241
PO File16890156
CSS29159

PHP code Passed 2 tests

This is a very shot 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.12
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%
Functions22
▷ Named functions1254.55%
▷ Anonymous functions1045.45%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png120.21KB44.81KB▼ 62.73%