83% wpdevelopers-youtube-share-buttons

Code Review | WPDevelopers YouTube Share Buttons

WordPress plugin WPDevelopers YouTube Share Buttons scored83%from 54 tests.

About plugin

  • Plugin page: wpdevelopers-yout...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Sep 3, 2015
  • Number of updates: 5
  • Update frequency: every 51.0 days
  • Top authors: TylerJohnsonDesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /850 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.01MB] [CPU: ▼6.42ms] Passed 4 tests

This is a short check of server-side resources used by WPDevelopers YouTube Share Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.65 ▲0.67
Dashboard /wp-admin3.31 ▼0.0444.52 ▼13.87
Posts /wp-admin/edit.php3.36 ▲0.0043.84 ▼2.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.91 ▼9.08
Media Library /wp-admin/upload.php3.23 ▲0.0034.00 ▼0.29

Server storage [IO: ▲0.28MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPDevelopers YouTube Share Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.34 ▼0.071.78 ▲0.0936.51 ▼2.49
Dashboard /wp-admin2,198 ▲215.63 ▼0.0484.69 ▼8.4138.05 ▼2.56
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0335.37 ▼1.6630.13 ▼6.95
Add New Post /wp-admin/post-new.php1,531 ▲322.89 ▲0.10595.51 ▼6.7960.87 ▲6.04
Media Library /wp-admin/upload.php1,400 ▼04.17 ▲0.01100.16 ▼9.9444.43 ▲2.98

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpdevelopers-youtube-share-buttons/wpdev-youtube-share-buttons.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg)
Please take inspiration from this readme.txt

wpdevelopers-youtube-share-buttons/wpdev-youtube-share-buttons.php 85% from 13 tests

The main PHP script in "WPDevelopers YouTube Share Buttons" version 1.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wpdevelopers-youtube-share-buttons.php" instead of "wpdev-youtube-share-buttons.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin109 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS113384
PHP1121525

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin