90% webshare

Code Review | Webshare

WordPress plugin Webshare scored90%from 54 tests.

About plugin

  • Plugin page: webshare
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.2
  • WordPress version: 6.3.1
  • First release: Mar 8, 2014
  • Latest release: May 6, 2015
  • Number of updates: 32
  • Update frequency: every 13.3 days
  • Top authors: sami.keijonen (96.88%)Otto42 (6.25%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /3,608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.39ms] Passed 4 tests

A check of server-side resources used by Webshare
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0835.98 ▼6.17
Dashboard /wp-admin3.38 ▲0.0445.19 ▼17.59
Posts /wp-admin/edit.php3.50 ▲0.1445.79 ▼1.02
Add New Post /wp-admin/post-new.php5.96 ▲0.0779.82 ▼12.78
Media Library /wp-admin/upload.php3.31 ▲0.0735.42 ▲1.67
Webshare /wp-admin/options-general.php?page=webshare-options3.2830.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 8 new options
New WordPress options
webshare_list
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
webshare_settings
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Webshare
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.58 ▼0.551.65 ▼0.1039.82 ▲0.00
Dashboard /wp-admin2,213 ▲254.86 ▼0.03100.59 ▼20.0940.61 ▼4.31
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0339.42 ▲3.2237.77 ▲5.12
Add New Post /wp-admin/post-new.php1,549 ▲3023.17 ▼0.01646.34 ▼108.7446.15 ▼1.77
Media Library /wp-admin/upload.php1,386 ▼54.21 ▲0.0296.12 ▼2.2641.94 ▼2.73
Webshare /wp-admin/options-general.php?page=webshare-options8951.8929.2430.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: social, sharing, genericons

webshare/webshare.php Passed 13 tests

The principal PHP file in "Webshare" v. 1.2.7 is loaded by WordPress automatically on each request
26 characters long description:
Adds social sharing links.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,281 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
SVG103487
PHP4133198290
CSS62621289
PO File23438111
Markdown144080
JavaScript16424

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.32
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods11
▷ Static methods327.27%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 images were found in this plugin