90% disable-gif-resizing

Code Review | Disable GIF Resizing

WordPress plugin Disable GIF Resizing scored90%from 54 tests.

About plugin

  • Plugin page: disable-gif-resizing
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2021
  • Latest release: Apr 23, 2021
  • Number of updates: 2
  • Update frequency: every 133.0 days
  • Top authors: alexmansfield (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /801 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
Installer ran successfully

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

This is a short check of server-side resources used by Disable GIF Resizing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.63 ▼2.34
Dashboard /wp-admin3.31 ▲0.0148.25 ▼5.62
Posts /wp-admin/edit.php3.36 ▲0.0048.48 ▼2.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.58 ▼15.83
Media Library /wp-admin/upload.php3.23 ▲0.0037.35 ▼3.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Disable GIF Resizing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.79 ▲0.111.66 ▼0.1240.69 ▲1.31
Dashboard /wp-admin2,209 ▲215.88 ▼0.0296.55 ▼15.4540.35 ▼1.98
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0339.52 ▲2.1837.31 ▲2.61
Add New Post /wp-admin/post-new.php1,514 ▼517.62 ▼5.68687.01 ▼12.3056.58 ▼4.49
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0098.55 ▼0.9344.48 ▼3.59

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
No tags were found

disable-gif-resizing/disable-gif-resizing.php Passed 13 tests

The main file in "Disable GIF Resizing" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
98 characters long description:
WordPress loses GIF animation when resizing, so this plugin prevents WordPress from resizing GIFs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151612

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
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
No PNG images were found in this plugin