83% customizer-refresh

Code Review | Customizer Refresh

WordPress plugin Customizer Refresh scored83%from 54 tests.

About plugin

  • Plugin page: customizer-refresh
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 3, 2018
  • Latest release: Jun 3, 2018
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: alexmangini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /773 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼3.71ms] Passed 4 tests

A check of server-side resources used by Customizer Refresh
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.14 ▲2.54
Dashboard /wp-admin3.31 ▲0.0144.24 ▼9.30
Posts /wp-admin/edit.php3.36 ▲0.0147.17 ▲1.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.71 ▼5.57
Media Library /wp-admin/upload.php3.23 ▲0.0132.06 ▼1.94

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Customizer Refresh: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.111.70 ▼0.3339.13 ▼5.79
Dashboard /wp-admin2,209 ▲185.86 ▲0.0398.91 ▼5.4839.30 ▼0.38
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0338.62 ▲0.4534.79 ▼0.18
Add New Post /wp-admin/post-new.php1,514 ▼1917.45 ▼5.63670.76 ▲77.0966.37 ▲8.92
Media Library /wp-admin/upload.php1,385 ▲34.21 ▼0.07104.34 ▲4.9442.40 ▼3.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customizer-refresh/customize-refresh.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === customizer-refresh === )
  • Screenshots: Add descriptions for screenshots #1, #2 in customizer-refresh/assets to your readme.txt
You can look at the official readme.txt

customizer-refresh/customize-refresh.php 92% from 13 tests

"Customizer Refresh" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("customizer-refresh.php" instead of "customize-refresh.php")

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
There were no executable files found in this plugin59 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS15038
PHP16911
JavaScript13010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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
There were not PNG files found in your plugin