94% customize-editor-control

Code Review | Customize Editor Control

WordPress plugin Customize Editor Control scored 94% from 54 tests.

About plugin

  • Plugin page: customize-editor-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8.2
  • WordPress version: 5.8.1
  • First release: Sep 11, 2017
  • Latest release: Sep 11, 2017
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: truongwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 629 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.32MB] [CPU: ▼169.66ms] Passed 4 tests

Server-side resources used by Customize Editor Control
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.17 ▲0.4536.89 ▲15.14
Dashboard /wp-admin3.41 ▲0.3645.55 ▲5.80
Posts /wp-admin/edit.php3.46 ▲0.3544.73 ▲2.10
Add New Post /wp-admin/post-new.php5.70 ▲0.2788.31 ▼686.94
Media Library /wp-admin/upload.php3.29 ▲0.2934.22 ▲0.41

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Customize Editor Control: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.91 ▲0.337.88 ▲0.0649.35 ▼0.29
Dashboard /wp-admin2,973 ▲425.89 ▼0.21144.03 ▼1.04107.51 ▼3.78
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0168.18 ▼0.2394.71 ▲2.65
Add New Post /wp-admin/post-new.php1,498 ▼18518.88 ▲0.08369.64 ▲4.9599.78 ▼4.64
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.02146.64 ▼14.56120.65 ▼3.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/customize-editor-control/inc/class-wp-customize-editor-control.php on line 9
    • > PHP Warning
      include(): Failed opening 'ABSPATHWPINC/class-wp-customize-control.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/customize-editor-control/inc/class-wp-customize-editor-control.php on line 9
    • > PHP Warning
      include(ABSPATHWPINC/class-wp-customize-control.php): failed to open stream: No such file or directory in wp-content/plugins/customize-editor-control/inc/class-wp-customize-editor-control.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/customize-editor-control/inc/class-wp-customize-editor-control.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/customize-editor-control/inc/class-wp-customize-editor-control.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (WordPress editor control in Customizer)
The official readme.txt might help

customize-editor-control/customize-editor-control.php 92% from 13 tests

The principal PHP file in "Customize Editor Control" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin85 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2136138
JavaScript19027
Markdown14020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png44.80KB16.93KB▼ 62.20%