10% free-large-file-sharing-widget-powered-by-sharepigcom

Code Review | Free File Sharing from Sharepig.com

WordPress plugin Free File Sharing from Sharepig.com scored 10% from 54 tests.

About plugin

  • Plugin page: free-large-file-s...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 5.8.1
  • First release: Jul 8, 2015
  • Latest release: Jul 8, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: shancox1988 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 457 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/free-large-file-sharing-widget-powered-by-sharepigcom/FreeFileSharingFromSharepigcom_Plugin.php+25
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.80MB] [CPU: ▼220.26ms] Passed 4 tests

A check of server-side resources used by Free File Sharing from Sharepig.com
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.83 ▼0.8910.31 ▼14.75
Dashboard /wp-admin1.85 ▼1.206.63 ▼33.73
Posts /wp-admin/edit.php1.85 ▼1.267.68 ▼35.41
Add New Post /wp-admin/post-new.php1.85 ▼3.586.58 ▼786.76
Media Library /wp-admin/upload.php1.85 ▼1.155.89 ▼25.12
Free File Sharing from Sharepig.com /wp-admin/plugins.php?page=FreeFileSharingFromSharepigcom_PluginSettings1.866.75

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 5 new options
New WordPress options
FreeFileSharingFromSharepigcom_Plugin__installed
FreeFileSharingFromSharepigcom_Plugin_widgetWidth
FreeFileSharingFromSharepigcom_Plugin_DashboardID
FreeFileSharingFromSharepigcom_Plugin_widgetHeight
FreeFileSharingFromSharepigcom_Plugin__version

Browser metrics Passed 4 tests

An overview of browser requirements for Free File Sharing from Sharepig.com
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲22916.33 ▲0.4112.81 ▲2.7245.67 ▼5.84
Dashboard /wp-admin2,982 ▲495.96 ▼0.02149.73 ▼5.04110.53 ▲3.97
Posts /wp-admin/edit.php2,745 ▲62.71 ▼0.0166.28 ▼0.9488.77 ▼3.72
Add New Post /wp-admin/post-new.php1,690 ▲1818.81 ▲0.00396.53 ▼8.82106.49 ▲3.48
Media Library /wp-admin/upload.php1,819 ▲125.12 ▲0.05166.66 ▲13.72112.95 ▲2.86
Free File Sharing from Sharepig.com /wp-admin/plugins.php?page=FreeFileSharingFromSharepigcom_PluginSettings1,1712.3657.5078.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 5 options in the database
    • FreeFileSharingFromSharepigcom_Plugin__installed
    • FreeFileSharingFromSharepigcom_Plugin_widgetHeight
    • FreeFileSharingFromSharepigcom_Plugin__version
    • FreeFileSharingFromSharepigcom_Plugin_widgetWidth
    • FreeFileSharingFromSharepigcom_Plugin_DashboardID

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=FreeFileSharingFromSharepigcom_PluginSettings
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/plugins.php?page=FreeFileSharingFromSharepigcom_PluginSettings
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=FreeFileSharingFromSharepigcom_PluginSettings
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/free-large-file-sharing-widget-powered-by-sharepigcom/free-file-sharing-from-sharepigcom.php:67

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 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: No tags were detected
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

free-large-file-sharing-widget-powered-by-sharepigcom/free-file-sharing-from-sharepigcom.php 85% from 13 tests

Analyzing the main PHP file in "Free File Sharing from Sharepig.com" version 0.1
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("free-large-file-sharing-widget-powered-by-sharepigcom.php" instead of "free-file-sharing-from-sharepigcom.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
No dangerous file extensions were detected10,698 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS415107,039
JavaScript42702753,138
PHP8172519521

PHP code Passed 2 tests

This is a very shot review of 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.30
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods4461.11%
▷ Protected methods2838.89%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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