90% socialhub

Code Review | SocialHub

WordPress plugin SocialHub scored90%from 54 tests.

About plugin

  • Plugin page: socialhub
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2018
  • Latest release: Apr 5, 2023
  • Number of updates: 21
  • Update frequency: every 95.5 days
  • Top authors: patrickdde (90.48%)mogbertus (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,522 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.46ms] Passed 4 tests

Analyzing server-side resources used by SocialHub
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1238.13 ▼5.01
Dashboard /wp-admin3.43 ▲0.0846.03 ▼16.39
Posts /wp-admin/edit.php3.54 ▲0.1847.37 ▲4.51
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.01 ▼1.34
Media Library /wp-admin/upload.php3.35 ▲0.1234.74 ▲0.92
SocialHub /wp-admin/options-general.php?page=socialhub-admin3.4231.71

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

SocialHub: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.26 ▼1.041.71 ▼0.4040.79 ▼7.03
Dashboard /wp-admin2,217 ▲294.84 ▼1.05112.74 ▼4.7942.84 ▲0.27
Posts /wp-admin/edit.php2,100 ▲82.00 ▼0.0640.82 ▲3.2635.03 ▲0.25
Add New Post /wp-admin/post-new.php1,521 ▼323.42 ▲0.13596.99 ▼108.1264.68 ▲9.64
Media Library /wp-admin/upload.php1,390 ▼14.28 ▲0.0797.58 ▲1.5243.78 ▲1.60
SocialHub /wp-admin/options-general.php?page=socialhub-admin7762.0524.5628.30

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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 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: integration, socialhub, social

socialhub/socialhub.php Passed 13 tests

The principal PHP file in "SocialHub" v. 1.0.4 is loaded by WordPress automatically on each request
36 characters long description:
Integrates WordPress with SocialHub.

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
Everything looks great! No dangerous files found in this plugin1,130 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP18187753867
Markdown1320168
JSON30087
CSS1005
JavaScript1013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.25
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods64
▷ Static methods1625.00%
▷ Public methods5484.38%
▷ Protected methods00.00%
▷ Private methods1015.62%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin