84% wp-gfycat

Code Review | WP Gfycat

WordPress plugin WP Gfycat scored 84% from 54 tests.

About plugin

  • Plugin page: wp-gfycat
  • Plugin version: 0.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 8, 2014
  • Latest release: Dec 4, 2018
  • Number of updates: 12
  • Update frequency: every 131.6 days
  • Top authors: leogg (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active / 3,791 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.01MB] [CPU: ▼5.23ms] Passed 4 tests

Server-side resources used by WP Gfycat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.09 ▼4.76
Dashboard /wp-admin3.32 ▲0.0256.25 ▲9.39
Posts /wp-admin/edit.php3.37 ▲0.0144.61 ▼1.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.99 ▼11.21
Media Library /wp-admin/upload.php3.24 ▲0.0134.42 ▼3.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Gfycat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8613.66 ▼0.645.59 ▲3.4245.51 ▲4.11
Dashboard /wp-admin2,212 ▲245.85 ▼0.21110.72 ▲10.2942.55 ▼5.71
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0335.10 ▼3.4032.51 ▲1.91
Add New Post /wp-admin/post-new.php1,520 ▼1023.39 ▲4.92656.28 ▲25.9737.52 ▼17.82
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.0494.28 ▼22.3644.02 ▼5.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-gfycat/wp-gfycat.php

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: gif, image, html5, video, gfycat...

wp-gfycat/wp-gfycat.php Passed 13 tests

The main file in "WP Gfycat" v. 0.9.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
A simple shortcode to add your gfycat videos into your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin938 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4147128899
PHP2183239

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/gfycat-btn.png0.62KB0.63KB0.00%