90% sketchfab-oembed

Code Review | Sketchfab Embed

WordPress plugin Sketchfab Embed scored90%from 54 tests.

About plugin

  • Plugin page: sketchfab-oembed
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2
  • WordPress version: 6.3.1
  • First release: Mar 1, 2015
  • Latest release: Jul 6, 2019
  • Number of updates: 25
  • Update frequency: every 63.5 days
  • Top authors: ramiy (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /11,454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Sketchfab Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.06 ▼6.24
Dashboard /wp-admin3.32 ▲0.0147.77 ▼1.21
Posts /wp-admin/edit.php3.37 ▲0.0152.56 ▼3.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.83 ▼0.21
Media Library /wp-admin/upload.php3.24 ▲0.0138.85 ▲2.02

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Sketchfab Embed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.081.54 ▲0.0141.46 ▼0.70
Dashboard /wp-admin2,195 ▲185.62 ▼0.0589.43 ▼2.6438.76 ▼0.29
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0440.46 ▲3.2034.80 ▼3.60
Add New Post /wp-admin/post-new.php1,526 ▼223.17 ▲0.07675.26 ▲9.5352.93 ▲7.26
Media Library /wp-admin/upload.php1,403 ▼04.20 ▼0.03101.82 ▲0.1842.16 ▼0.09

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: oembed, sketchfab, 3d, embed, models

sketchfab-oembed/sketchfab-oembed.php Passed 13 tests

This is the main PHP file of "Sketchfab Embed" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Embed 3D models from sketchfab.com into your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin47 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5286647

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.25MB with 0.16MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.17KB9.04KB▼ 66.72%
screenshot-2.png232.77KB98.67KB▼ 57.61%