84% easy-thumbnail-switcher

Code Review | Easy Thumbnail Switcher

WordPress plugin Easy Thumbnail Switcher scored84%from 54 tests.

About plugin

  • Plugin page: easy-thumbnail-sw...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Oct 29, 2015
  • Latest release: May 18, 2018
  • Number of updates: 22
  • Update frequency: every 51.6 days
  • Top authors: sohan5005 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /4,218 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.67ms] Passed 4 tests

A check of server-side resources used by Easy Thumbnail Switcher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0737.99 ▼3.67
Dashboard /wp-admin3.40 ▲0.0250.06 ▼12.59
Posts /wp-admin/edit.php3.53 ▲0.1550.63 ▲1.79
Add New Post /wp-admin/post-new.php5.98 ▲0.0682.50 ▼21.94
Media Library /wp-admin/upload.php3.32 ▲0.0634.74 ▼0.47

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Thumbnail Switcher
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.20 ▼1.171.54 ▼0.2240.71 ▼2.32
Dashboard /wp-admin2,234 ▲464.86 ▲0.0196.94 ▼21.0542.48 ▼3.96
Posts /wp-admin/edit.php2,323 ▲2343.89 ▲1.8599.48 ▲65.3631.99 ▼2.73
Add New Post /wp-admin/post-new.php1,552 ▲1923.31 ▼0.01654.65 ▼32.1749.71 ▼10.85
Media Library /wp-admin/upload.php1,413 ▲224.13 ▼0.1081.03 ▼17.8141.19 ▼0.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-thumbnail-switcher/easy-thumbnail-switcher.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: thumbnail, image, post, admin, images...

easy-thumbnail-switcher/easy-thumbnail-switcher.php Passed 13 tests

Analyzing the main PHP file in "Easy Thumbnail Switcher" version 1.0.2
123 characters long description:
Adds a new column in all posts screen, from where you will be able to set or change or remove featured image of every post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin294 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28764213
JavaScript120067
CSS15014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.50
▷ Minimum class complexity15.00
▷ Maximum class complexity16.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin