83% reset-thumbnails

Code Review | Reset Thumbnails

WordPress plugin Reset Thumbnails scored83%from 54 tests.

About plugin

  • Plugin page: reset-thumbnails
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: May 28, 2015
  • Latest release: May 28, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: lenanghai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /997 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.89ms] Passed 4 tests

Server-side resources used by Reset Thumbnails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.36 ▲0.16
Dashboard /wp-admin3.46 ▲0.1645.50 ▼3.06
Posts /wp-admin/edit.php3.57 ▲0.2248.97 ▲5.33
Add New Post /wp-admin/post-new.php6.06 ▲0.1895.19 ▲4.79
Media Library /wp-admin/upload.php3.38 ▲0.1637.07 ▲1.68
Reset Thumbnails /wp-admin/options-general.php?page=Reset_Thumbnails_settings3.3936.17

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reset Thumbnails
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18113.98 ▼0.405.37 ▲3.1335.37 ▼6.77
Dashboard /wp-admin2,214 ▲255.88 ▲0.96107.35 ▼14.8643.81 ▼1.21
Posts /wp-admin/edit.php2,097 ▲82.04 ▼0.0039.37 ▲2.8734.40 ▲2.80
Add New Post /wp-admin/post-new.php1,521 ▼1223.36 ▼0.04639.45 ▼14.5953.45 ▼16.10
Media Library /wp-admin/upload.php1,393 ▲54.18 ▼0.0195.92 ▼26.6742.90 ▼3.46
Reset Thumbnails /wp-admin/options-general.php?page=Reset_Thumbnails_settings1,0983.1648.9056.40

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 did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • Reset_Thumbnails_version
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=Reset_Thumbnails_settings
    • > Network (severe)
    wp-content/plugins/reset-thumbnails/assets/css/reset-thumbnails-reset-thumbnails-admin.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === reset-thumbnails === )
  • Screenshots: Add an image for screenshot #1 (Screenshots in `/reset-thumbnails/screenshot.png` .)
You can look at the official readme.txt

reset-thumbnails/reset-thumbnails.php 92% from 13 tests

This is the main PHP file of "Reset Thumbnails" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,580 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
XML800711
PHP7194383641
JavaScript53416201
CSS14027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity29.00
▷ Minimum class complexity11.00
▷ Maximum class complexity61.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods4095.24%
▷ Protected methods00.00%
▷ Private methods24.76%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png80.16KB32.75KB▼ 59.14%