84% better-share-links-shortcode

Code Review | Better Share Links shortcode

WordPress plugin Better Share Links shortcode scored84%from 54 tests.

About plugin

  • Plugin page: better-share-link...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.1
  • WordPress version: 6.3.1
  • First release: Dec 20, 2014
  • Latest release: Feb 10, 2015
  • Number of updates: 4
  • Update frequency: every 13.5 days
  • Top authors: peeping4dsun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /901 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.03MB] [CPU: ▼6.08ms] Passed 4 tests

A check of server-side resources used by Better Share Links shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.35 ▼1.28
Dashboard /wp-admin3.33 ▲0.0347.30 ▼2.28
Posts /wp-admin/edit.php3.39 ▲0.0346.81 ▼6.30
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.24 ▼14.45
Media Library /wp-admin/upload.php3.25 ▲0.0337.35 ▼0.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Better Share Links shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.40 ▲0.032.13 ▲0.2742.94 ▼1.39
Dashboard /wp-admin2,192 ▲155.54 ▼0.0585.34 ▼2.4038.50 ▼6.58
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0234.80 ▼3.7036.51 ▲0.72
Add New Post /wp-admin/post-new.php1,545 ▼523.07 ▼0.41667.57 ▼11.0050.77 ▼6.39
Media Library /wp-admin/upload.php1,403 ▼04.23 ▲0.0193.65 ▼12.0345.20 ▼0.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_ajaxpostloadmoreadmin
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 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 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-share-links-shortcode/better_share_links.php:30

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: urls, shortcode, screenshot, embed, links

better-share-links-shortcode/better_share_links.php 92% from 13 tests

Analyzing the main PHP file in "Better Share Links shortcode" version 1.0.0
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("better-share-links-shortcode.php" instead of "better_share_links.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
Everything looks great! No dangerous files found in this plugin1,400 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22163251,389
JavaScript10011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity163.50
▷ Minimum class complexity130.00
▷ Maximum class complexity197.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods6981.18%
▷ Protected methods1618.82%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
There were not PNG files found in your plugin