10% nerd-social-share-buttons

Code Review | nerd Simple Share Buttons

WordPress plugin nerd Simple Share Buttons scored10%from 54 tests.

About plugin

  • Plugin page: nerd-social-share...
  • Plugin version: 2.0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.2
  • WordPress version: 6.3.1
  • First release: May 20, 2015
  • Latest release: Nov 18, 2016
  • Number of updates: 15
  • Update frequency: every 39.7 days
  • Top authors: 360crest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,255 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/nerd-social-share-buttons/nerd-share.php+25
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.55ms] Passed 4 tests

This is a short check of server-side resources used by nerd Simple Share Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.21 ▼8.19
Dashboard /wp-admin3.35 ▲0.0045.42 ▼14.96
Posts /wp-admin/edit.php3.40 ▲0.0444.58 ▼5.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.59 ▼9.69
Media Library /wp-admin/upload.php3.27 ▲0.0436.41 ▲3.37
nerd Social Share /wp-admin/options-general.php?page=nerd-social-plugin-nerd3.2226.38

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
nerd_social_plugin
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by nerd Simple Share Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6414.48 ▲0.101.93 ▼0.0535.92 ▼11.39
Dashboard /wp-admin2,213 ▲284.82 ▼1.06100.39 ▼4.6938.16 ▼5.92
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0238.68 ▼0.3137.13 ▲1.15
Add New Post /wp-admin/post-new.php1,517 ▼1117.51 ▼5.64683.70 ▼44.0665.40 ▼1.71
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0394.09 ▼14.4339.81 ▼7.80
nerd Social Share /wp-admin/options-general.php?page=nerd-social-plugin-nerd9332.1525.6230.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=nerd-social-plugin-nerd
    • > 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/options-general.php?page=nerd-social-plugin-nerd
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/nerd-social-share-buttons/nerd-share.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/nerd-social-share-buttons/nerd-social-plugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Share buttons appearance at the frontend), #2 (Plugin backend settings)
Please take inspiration from this readme.txt

nerd-social-share-buttons/nerd-share.php 92% from 13 tests

This is the main PHP file of "nerd Simple Share Buttons" version 2.0.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nerd-social-share-buttons.php" instead of "nerd-share.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected764 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP38463422
CSS34214342

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
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
10 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flickr.png1.14KB0.19KB▼ 83.02%
images/rss.png1.36KB0.37KB▼ 72.93%
images/dribbble.png1.51KB0.44KB▼ 70.51%
images/pinterest.png1.38KB0.38KB▼ 72.34%
images/gplus.png1.38KB0.36KB▼ 74.01%