84% easythumbnail-sizes

Code Review | Easy Thumbnail Sizes

WordPress plugin Easy Thumbnail Sizes scored84%from 54 tests.

About plugin

  • Plugin page: easythumbnail-sizes
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.4
  • WordPress version: 6.3.1
  • First release: Nov 19, 2014
  • Latest release: Nov 21, 2016
  • Number of updates: 13
  • Update frequency: every 68.1 days
  • Top authors: Latz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,950 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Easy Thumbnail Sizes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0452.49 ▲6.33
Dashboard /wp-admin3.34 ▲0.0458.31 ▲4.92
Posts /wp-admin/edit.php3.40 ▲0.0459.31 ▲2.34
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.53 ▼11.29
Media Library /wp-admin/upload.php3.27 ▲0.0438.52 ▼1.69

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Thumbnail Sizes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.27 ▼0.281.70 ▼0.2441.57 ▼3.58
Dashboard /wp-admin2,198 ▲215.57 ▼0.0792.29 ▼4.6938.69 ▼0.74
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0440.05 ▼0.6536.37 ▼0.96
Add New Post /wp-admin/post-new.php1,526 ▼223.26 ▲0.22690.82 ▼9.5553.75 ▲1.02
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.02101.66 ▼15.4148.75 ▼0.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easythumbnail-sizes/EasyThumbnailSizes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easythumbnail-sizes/EasyThumbnailSizes_options.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: thumbnail, theme

easythumbnail-sizes/EasyThumbnailSizes.php 85% from 13 tests

The main PHP script in "Easy Thumbnail Sizes" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easythumbnail-sizes.php" instead of "EasyThumbnailSizes.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.8" instead of "3.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin376 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34118197
PO File2262690
JavaScript120889

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin