90% wp-gif-player-play-and-pause

Code Review | WP GIF Player - Play & Pause

WordPress plugin WP GIF Player - Play & Pause scored90%from 54 tests.

About plugin

  • Plugin page: wp-gif-player-pla...
  • Plugin version: 0.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.0
  • WordPress version: 6.3.1
  • First release: Apr 22, 2020
  • Latest release: Apr 11, 2021
  • Number of updates: 6
  • Update frequency: every 59.0 days
  • Top authors: RokuMetal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /6,139 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.40ms] Passed 4 tests

An overview of server-side resources used by WP GIF Player - Play & Pause
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.18 ▲1.47
Dashboard /wp-admin3.35 ▲0.0048.95 ▼14.61
Posts /wp-admin/edit.php3.46 ▲0.1147.32 ▲3.71
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.18 ▼10.96
Media Library /wp-admin/upload.php3.27 ▲0.0435.47 ▼1.50
WP GIF Player /wp-admin/options-general.php?page=wp-gif-player3.2431.25

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP GIF Player - Play & Pause: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.001.80 ▲0.1944.09 ▲2.28
Dashboard /wp-admin2,199 ▲255.61 ▼0.0889.99 ▼1.1442.51 ▲3.74
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0436.26 ▼1.0034.00 ▼1.12
Add New Post /wp-admin/post-new.php6,200 ▲4,66518.98 ▲0.63907.94 ▲221.4055.39 ▼19.60
Media Library /wp-admin/upload.php1,404 ▲14.22 ▲0.0598.71 ▲3.0341.58 ▼3.15
WP GIF Player /wp-admin/options-general.php?page=wp-gif-player8372.0123.3627.42

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
2 plugin tags: gif, player

wp-gif-player-play-and-pause/wp-gif-player-play-and-pause.php Passed 13 tests

"WP GIF Player - Play & Pause" version 0.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
116 characters long description:
Insert GIFs that can be played and paused into your WordPress posts and pages using shortcodes and Gutenberg blocks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,951 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP15300795996
JavaScript6216235896
CSS18059

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits2
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods3479.07%
▷ Protected methods00.00%
▷ Private methods920.93%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin