78% wp-admin-customizer

Code Review | WP-Admin Customizer

WordPress plugin WP-Admin Customizer scored78%from 54 tests.

About plugin

  • Plugin page: wp-admin-customizer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Sep 4, 2012
  • Latest release: Mar 17, 2014
  • Number of updates: 7
  • Update frequency: every 80.6 days
  • Top authors: The Jake Group (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /4,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by WP-Admin Customizer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.92 ▲1.29
Dashboard /wp-admin3.36 ▲0.0649.49 ▼2.12
Posts /wp-admin/edit.php3.41 ▲0.0546.91 ▼3.49
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.50 ▼13.20
Media Library /wp-admin/upload.php3.28 ▲0.0534.41 ▼3.48
Admin Theme /wp-admin/options-general.php?page=admin-theme-menu3.2632.61

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 20 new options
New WordPress options
admin-theme-dashboard_recent_comments
admin-theme-small-logo
widget_theysaidso_widget
can_compress_scripts
admin-theme-dashboard_secondary
admin-theme-login-logo
widget_recent-comments
admin-theme-rounded-corners
admin-theme-dashboard_right_now
admin-theme-dashboard_quick_press
...

Browser metrics Passed 4 tests

Checking browser requirements for WP-Admin Customizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲5614.26 ▼0.091.64 ▼0.5331.53 ▼8.84
Dashboard /wp-admin2,243 ▲695.66 ▲0.1091.32 ▼5.9238.31 ▼4.02
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0936.19 ▲0.2131.23 ▼3.54
Add New Post /wp-admin/post-new.php1,538 ▲1218.21 ▼5.22585.31 ▼97.1756.70 ▼4.07
Media Library /wp-admin/upload.php1,404 ▲74.25 ▼0.15104.58 ▲3.6137.97 ▼7.10
Admin Theme /wp-admin/options-general.php?page=admin-theme-menu1,0062.0641.1342.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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)
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
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: category in wp-content/plugins/wp-admin-customizer/processors/contact_form.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-admin-customizer/base.php:16
    • > PHP Notice
      Undefined index: name in wp-content/plugins/wp-admin-customizer/processors/contact_form.php on line 9
    • > PHP Notice
      Undefined index: message in wp-content/plugins/wp-admin-customizer/processors/contact_form.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-admin-customizer/settings.php:7
    • > PHP Notice
      Undefined index: email in wp-content/plugins/wp-admin-customizer/processors/contact_form.php on line 9
    • > PHP Warning
      include(): Failed opening 'TJG_AT_PATH/lib/lessc.inc.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-admin-customizer/processors/settings_update.php on line 4
    • > PHP Warning
      include(TJG_AT_PATH/lib/lessc.inc.php): failed to open stream: No such file or directory in wp-content/plugins/wp-admin-customizer/processors/settings_update.php on line 4
    • > PHP Warning
      Use of undefined constant TJG_AT_PATH - assumed 'TJG_AT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-admin-customizer/processors/settings_update.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-admin-customizer/processors/settings_update.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=admin-theme-menu
    • > Network (severe)
    wp-content/plugins/wp-admin-customizer/css/wp_override.css?ver=1697379821 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=admin-theme-menu
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-admin-customizer/js/plugin.js?ver=1697379821 32:8 Uncaught TypeError: Cannot read properties of undefined (reading 'preventDefault')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (A customized admin bar.), #2 (The admin bar customization screen.)
The official readme.txt is a good inspiration

wp-admin-customizer/base.php 92% from 13 tests

The main file in "WP-Admin Customizer" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-admin-customizer.php" instead of "base.php")

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
No dangerous file extensions were detected3,189 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP96794042,960
LESS16048113
CSS1261584
JavaScript113232

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity124.80
▷ Minimum class complexity1.00
▷ Maximum class complexity316.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods156
▷ Static methods42.56%
▷ Public methods2817.95%
▷ Protected methods12882.05%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png76.84KB23.68KB▼ 69.18%
img/update-dark.png0.82KB0.96KB0.00%
img/comment-dark.png0.54KB0.60KB0.00%
screenshot-1.png10.88KB4.80KB▼ 55.85%