83% sbs-oembed-service

Code Review | SBS oEmbed Service

WordPress plugin SBS oEmbed Service scored83%from 54 tests.

About plugin

  • Plugin page: sbs-oembed-service
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.6
  • WordPress version: 6.3.1
  • First release: Sep 25, 2013
  • Latest release: Sep 25, 2013
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: peterph (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.31ms] Passed 4 tests

An overview of server-side resources used by SBS oEmbed Service
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.60 ▼0.02
Dashboard /wp-admin3.31 ▼0.0344.03 ▼14.47
Posts /wp-admin/edit.php3.37 ▲0.0147.57 ▲3.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.89 ▼16.39
Media Library /wp-admin/upload.php3.24 ▲0.0134.35 ▲1.66

Server storage [IO: ▲0.24MB] [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
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for SBS oEmbed Service
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▲0.071.57 ▼0.1738.02 ▼4.74
Dashboard /wp-admin2,195 ▲155.51 ▼0.1682.01 ▼8.8744.76 ▼0.43
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0439.77 ▲3.7035.59 ▼0.73
Add New Post /wp-admin/post-new.php1,535 ▲417.99 ▼5.16610.52 ▼6.9463.06 ▲14.17
Media Library /wp-admin/upload.php1,397 ▼04.21 ▲0.04102.68 ▼3.2343.53 ▼1.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 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/sbs-oembed-service/sbs-oembed.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sbs-oembed-service === )
Please take inspiration from this readme.txt

sbs-oembed-service/sbs-oembed.php 85% from 13 tests

The main file in "SBS oEmbed Service" v. 0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 165 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("sbs-oembed-service.php" instead of "sbs-oembed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP141314

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.33
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.64KB9.07KB▼ 59.94%
screenshot-2.png225.68KB105.90KB▼ 53.07%