84% customize-object-selector

Code Review | Customize Object Selector

WordPress plugin Customize Object Selector scored84%from 54 tests.

About plugin

  • Plugin page: customize-object-...
  • Plugin version: 0.4.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-4.9.0
  • WordPress version: 6.3.1
  • First release: Sep 7, 2016
  • Latest release: Nov 9, 2017
  • Number of updates: 12
  • Update frequency: every 35.8 days
  • Top authors: westonruter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /6,253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.00ms] Passed 4 tests

Server-side resources used by Customize Object Selector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1434.97 ▼2.86
Dashboard /wp-admin3.44 ▲0.1441.21 ▼6.63
Posts /wp-admin/edit.php3.49 ▲0.1347.26 ▲1.16
Add New Post /wp-admin/post-new.php6.02 ▲0.1375.73 ▼13.77
Media Library /wp-admin/upload.php3.36 ▲0.1335.27 ▼0.74

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

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

Browser metrics Passed 4 tests

Customize Object Selector: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.161.70 ▲0.0938.00 ▼3.69
Dashboard /wp-admin2,198 ▲215.65 ▼0.0295.47 ▲6.9945.98 ▲3.33
Posts /wp-admin/edit.php2,100 ▼02.15 ▲0.1837.19 ▲3.5234.20 ▲0.07
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.44635.03 ▼62.9649.47 ▼5.62
Media Library /wp-admin/upload.php1,394 ▼94.19 ▲0.0195.77 ▲1.3441.15 ▼2.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/customize-object-selector/php/class-control.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_PageDropdown' not found in wp-content/plugins/customize-object-selector/php/class-post-tree-walker.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customize-object-selector/customize-object-selector.php:37

User-side errors Passed 1 test

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

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
6 plugin tags: customize, pages, posts, customizer, dropdown...

customize-object-selector/customize-object-selector.php 85% from 13 tests

The main file in "Customize Object Selector" v. 0.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin6,585 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript551,4085815,457
PHP493249647
CSS4661481

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity24.00
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1688.89%
▷ Protected methods211.11%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There were not PNG files found in your plugin