72% shareboost

Code Review | Shareboost

WordPress plugin Shareboost scored72%from 54 tests.

About plugin

  • Plugin page: shareboost
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Aug 2, 2013
  • Latest release: Aug 4, 2013
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: ronreiter (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,129 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.95ms] Passed 4 tests

This is a short check of server-side resources used by Shareboost
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0369.50 ▲25.84
Dashboard /wp-admin3.32 ▲0.0150.01 ▲1.21
Posts /wp-admin/edit.php3.37 ▲0.0148.76 ▼1.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.99 ▼15.95
Media Library /wp-admin/upload.php3.24 ▲0.0137.09 ▼3.70
Shareboost /wp-admin/plugins.php?page=shareboost-wordpress3.2732.73

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Shareboost
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.91 ▼0.539.07 ▲7.4240.54 ▲0.76
Dashboard /wp-admin2,196 ▲225.59 ▼0.0385.74 ▼5.3338.75 ▼2.98
Posts /wp-admin/edit.php2,101 ▲42.01 ▲0.0233.60 ▼5.7934.49 ▼2.51
Add New Post /wp-admin/post-new.php1,552 ▲2618.76 ▲1.07638.07 ▼31.2858.57 ▲7.50
Media Library /wp-admin/upload.php1,404 ▲44.15 ▼0.10100.00 ▼8.2142.42 ▼2.34
Shareboost /wp-admin/plugins.php?page=shareboost-wordpress1,0411.6924.8763.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/plugins.php?page=shareboost-wordpress
    • > Notice in wp-content/plugins/shareboost/views/admin.php+15
    Undefined index: title
    • > GET request to /wp-admin/plugins.php?page=shareboost-wordpress
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/plugins.php?page=shareboost-wordpress
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/shareboost/views/public.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: title in wp-content/plugins/shareboost/views/admin.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shareboost/views/admin.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

shareboost/shareboost-wordpress.php 92% from 13 tests

The main file in "Shareboost" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shareboost.php" instead of "shareboost-wordpress.php")

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
There were no executable files found in this plugin13,398 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS62,0569212,681
SVG200448
PHP773184259
JavaScript20210

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods323.08%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png48.80KB22.35KB▼ 54.20%
screenshot-1.png165.25KB38.27KB▼ 76.84%
assets/banner-772x250.png19.32KB9.23KB▼ 52.23%