10% sayitright-embed

Code Review | SayitRight Embed

WordPress plugin SayitRight Embed scored10%from 54 tests.

About plugin

  • Plugin page: sayitright-embed
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2014
  • Latest release: Oct 7, 2016
  • Number of updates: 17
  • Update frequency: every 43.4 days
  • Top authors: moosch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,083 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/sayitright-embed/admin/class-sayitright-embed-admin.php+49
    Use of undefined constant RIDWPAISWP30 - assumed 'RIDWPAISWP30' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.84MB] [CPU: ▼46.35ms] Passed 4 tests

This is a short check of server-side resources used by SayitRight Embed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.19 ▲3.37
Dashboard /wp-admin2.10 ▼1.2014.82 ▼33.76
Posts /wp-admin/edit.php2.10 ▼1.266.35 ▼40.89
Add New Post /wp-admin/post-new.php2.10 ▼3.795.74 ▼84.35
Media Library /wp-admin/upload.php2.10 ▼1.136.07 ▼26.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SayitRight Embed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8314.81 ▲0.142.61 ▲0.7646.87 ▲3.02
Dashboard /wp-admin2,206 ▲154.88 ▼1.18109.37 ▼5.6839.11 ▼8.13
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0137.89 ▼0.6633.08 ▼6.03
Add New Post /wp-admin/post-new.php1,542 ▲2323.20 ▼0.09648.18 ▲9.7067.25 ▲4.94
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0294.91 ▼5.1140.87 ▼2.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/sayitright-embed/admin/class-sayitright-embed-admin.php+49
    Use of undefined constant RIDWPAISWP30 - assumed 'RIDWPAISWP30' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 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 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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 require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The shortcode dropdown), #2 (The shortcodes being used)
The official readme.txt might help

sayitright-embed/sayitright-embed.php Passed 13 tests

The main PHP file in "SayitRight Embed" ver. 0.0.2 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
A plugin to embed stations, channels and programs from the SayitRight network.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected12,141 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS6120919,268
JavaScript73302511,959
SVG200749
PHP537171165

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.50
▷ Minimum class complexity5.00
▷ Maximum class complexity8.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/sayitright-embed.png2.83KB0.13KB▼ 95.23%
assets/img/sir-embed-shortcode-dropdown.png54.75KB18.36KB▼ 66.47%
assets/img/sir-embed-shortcode.png48.80KB15.62KB▼ 68.00%