84% disable-generate-thumbnails

Code Review | Disable Generate Thumbnails

WordPress plugin Disable Generate Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: disable-generate-...
  • Plugin version: 2.12
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 6, 2019
  • Latest release: Oct 28, 2023
  • Number of updates: 37
  • Update frequency: every 39.2 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

5,000+ active /23,045 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Disable Generate Thumbnails
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.35 ▼7.34
Dashboard /wp-admin3.31 ▼0.0347.44 ▼11.00
Posts /wp-admin/edit.php3.37 ▲0.0141.98 ▼4.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.49 ▼5.32
Media Library /wp-admin/upload.php3.24 ▲0.0135.00 ▲4.58
Disable Generate Thumbnails /wp-admin/options-general.php?page=disablegeneratethumbnails3.2232.93

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
disablegeneratethumbnails_threshold
disablegeneratethumbnails
theysaidso_admin_options
db_upgraded
widget_recent-comments
disablegeneratethumbnails_exif_rotate
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Disable Generate Thumbnails
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8314.76 ▲0.492.09 ▲0.5445.83 ▲6.29
Dashboard /wp-admin2,199 ▲185.56 ▼0.0692.68 ▼11.5941.63 ▲4.10
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0133.03 ▼3.2334.80 ▲2.33
Add New Post /wp-admin/post-new.php1,529 ▼023.60 ▼0.05676.18 ▼31.5752.21 ▼4.34
Media Library /wp-admin/upload.php1,404 ▲14.19 ▲0.03100.60 ▲5.4347.05 ▲4.38
Disable Generate Thumbnails /wp-admin/options-general.php?page=disablegeneratethumbnails1,0096.94176.7631.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-generate-thumbnails/lib/class-disablegeneratethumbnailsadmin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-generate-thumbnails/lib/class-disablegeneratethumbnails.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-generate-thumbnails/lib/class-disablegeneratethumbnails.php:37

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: media, disable, thumbnails

disable-generate-thumbnails/disablegeneratethumbnails.php 92% from 13 tests

"Disable Generate Thumbnails" version 2.12's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("disable-generate-thumbnails.php" instead of "disablegeneratethumbnails.php")

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
Success! There were no dangerous files found in this plugin408 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP554140241
JavaScript3173117
CSS21028
JSON10020
Sass1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.00
▷ Minimum class complexity5.00
▷ Maximum class complexity17.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin