90% google-docs-oembed

Code Review | Google Docs oEmbed

WordPress plugin Google Docs oEmbed scored90%from 54 tests.

About plugin

  • Plugin page: google-docs-oembed
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Jun 21, 2015
  • Latest release: Oct 15, 2016
  • Number of updates: 29
  • Update frequency: every 17.3 days
  • Top authors: s3rgiosan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,465 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by Google Docs oEmbed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.79 ▼5.55
Dashboard /wp-admin3.31 ▲0.0147.79 ▼6.75
Posts /wp-admin/edit.php3.36 ▲0.0053.02 ▲1.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.20 ▲1.08
Media Library /wp-admin/upload.php3.23 ▲0.0037.92 ▲2.52

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Docs oEmbed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.164.99 ▲3.1544.68 ▼2.18
Dashboard /wp-admin2,206 ▲154.85 ▼0.04110.06 ▲5.3542.40 ▼3.38
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0541.12 ▲6.8338.41 ▲0.45
Add New Post /wp-admin/post-new.php1,519 ▼523.12 ▲0.09598.15 ▼73.0856.39 ▲3.46
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.05100.21 ▼2.0941.65 ▼7.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: oembed, presentation, document, embed, google...

google-docs-oembed/google-docs-oembed.php Passed 13 tests

The main PHP script in "Google Docs oEmbed" version 1.0.10 is automatically included on every request by WordPress
78 characters long description:
Embed Google documents, spreadsheets and presentations in your posts or pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected465 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12112374426
Markdown111022
XML15216
JSON1001

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.41
Average class complexity9.83
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods3088.24%
▷ Protected methods00.00%
▷ Private methods411.76%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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
There were not PNG files found in your plugin