93% customizer-theme-resizer

Code Review | Customizer Theme Resizer

WordPress plugin Customizer Theme Resizer scored 93% from 54 tests.

About plugin

  • Plugin page: customizer-theme-...
  • Plugin version: 0.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 5.8.1
  • First release: May 11, 2015
  • Latest release: May 11, 2015
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: Webnist (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active / 2,854 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼146.53ms] Passed 4 tests

A check of server-side resources used by Customizer Theme Resizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0237.73 ▲0.59
Dashboard /wp-admin3.08 ▲0.0343.70 ▼9.29
Posts /wp-admin/edit.php3.13 ▲0.0348.24 ▲0.81
Add New Post /wp-admin/post-new.php5.44 ▲0.01102.01 ▼566.10
Media Library /wp-admin/upload.php3.02 ▲0.0239.36 ▼11.33

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Customizer Theme Resizer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13116.31 ▲0.6110.74 ▲0.7448.27 ▼6.70
Dashboard /wp-admin2,967 ▲305.93 ▼0.16167.81 ▲5.41129.26 ▲3.88
Posts /wp-admin/edit.php2,739 ▲32.72 ▲0.0272.96 ▲0.9299.40 ▲2.58
Add New Post /wp-admin/post-new.php1,683 ▼1,95118.71 ▲0.40397.36 ▼125.04118.84 ▼1.88
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.01162.52 ▼14.52134.18 ▼7.49

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/customizer-theme-resizer/plugin.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'CustomizerThemeResizerInit' not found in wp-content/plugins/customizer-theme-resizer/lib/customizer-theme-resizer.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Resizer Ber) image missing
You can take inspiration from this readme.txt

customizer-theme-resizer/plugin.php 85% from 13 tests

Analyzing the main PHP file in "Customizer Theme Resizer" version 0.7.5
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("customizer-theme-resizer.php" instead of "plugin.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
Good job! No executable or dangerous file extensions detected196 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2711107
JavaScript13063
CSS10026

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.88KB12.07KB▼ 58.19%