78% sharing-club

Code Review | Sharing Club

WordPress plugin Sharing Club scored 78% from 54 tests.

About plugin

  • Plugin page: sharing-club
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2016
  • Latest release: Dec 2, 2022
  • Number of updates: 25
  • Update frequency: every 87.3 days
  • Top authors: netdelight (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active / 2,642 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.17MB] [CPU: ▲3.93ms] Passed 4 tests

This is a short check of server-side resources used by Sharing Club
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1643.84 ▲4.02
Dashboard /wp-admin3.47 ▲0.1750.40 ▼0.33
Posts /wp-admin/edit.php3.56 ▲0.2155.61 ▲2.66
Add New Post /wp-admin/post-new.php6.05 ▲0.17104.68 ▲15.03
Media Library /wp-admin/upload.php3.39 ▲0.1641.81 ▲9.37
Categories /wp-admin/edit-tags.php?taxonomy=shared_item_category&post_type=shared_item3.3840.13
Sharing Club /wp-admin/options-general.php?page=theme-settings3.3639.18
Lendings /wp-admin/edit-tags.php?taxonomy=shared_item_category&post_type=shared_item&page=display_lending_table3.2034.65
Lending form /wp-admin/admin.php?page=display_lending_form3.3937.84

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
sharing-club_version
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Sharing Club: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.70 ▼0.681.55 ▼0.2641.92 ▼11.90
Dashboard /wp-admin2,245 ▲574.89 ▲0.01107.73 ▼1.4941.19 ▼6.64
Posts /wp-admin/edit.php2,128 ▲391.98 ▼0.0140.48 ▲0.8339.20 ▲0.47
Add New Post /wp-admin/post-new.php1,569 ▲5523.20 ▲5.67676.78 ▲74.8359.19 ▲4.39
Media Library /wp-admin/upload.php1,418 ▲274.19 ▲0.0196.40 ▼7.9542.92 ▼1.67
Categories /wp-admin/edit-tags.php?taxonomy=shared_item_category&post_type=shared_item1,3012.1427.4428.82
Sharing Club /wp-admin/options-general.php?page=theme-settings8332.0323.9325.89
Lendings /wp-admin/edit-tags.php?taxonomy=shared_item_category&post_type=shared_item&page=display_lending_table280.440.103.59
Lending form /wp-admin/admin.php?page=display_lending_form1,0191.9227.9934.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • sharing-club_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=display_lending_form
    • > Notice in wp-content/plugins/sharing-club/admin-lending-form-display.php+34
    Undefined index: nonce

SRP Passed 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 SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/edit-tags.php?taxonomy=shared_item_category&post_type=shared_item&page=display_lending_table
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=shared_item_category&post_type=shared_item&page=display_lending_table - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=display_lending_form
    • > Network (severe)
    wp-content/plugins/sharing-club/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not 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
10 plugin tags: sharing club, lending, library, book, lend...

sharing-club/sharing-club.php 92% from 13 tests

"Sharing Club" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,653 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8116171827
CSS24674520
PO File2112116287
JavaScript225419

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.33
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods635.29%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin