84% sitebrand-customizer

Code Review | SiteBrand Customizer

WordPress plugin SiteBrand Customizer scored84%from 54 tests.

About plugin

  • Plugin page: sitebrand-customizer
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.1
  • WordPress version: 6.3.1
  • First release: May 29, 2019
  • Latest release: Oct 11, 2019
  • Number of updates: 20
  • Update frequency: every 6.8 days
  • Top authors: joaomaridalho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /710 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.59ms] Passed 4 tests

Analyzing server-side resources used by SiteBrand Customizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.63 ▲0.54
Dashboard /wp-admin3.31 ▲0.0045.68 ▼0.86
Posts /wp-admin/edit.php3.36 ▲0.0047.16 ▲0.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.40 ▼13.75
Media Library /wp-admin/upload.php3.23 ▲0.0031.29 ▲0.20

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

SiteBrand Customizer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.32 ▼1.261.75 ▼0.3144.13 ▲0.77
Dashboard /wp-admin2,209 ▲245.86 ▲0.98109.07 ▼14.2638.12 ▼4.94
Posts /wp-admin/edit.php2,086 ▼62.04 ▲0.0336.08 ▼6.5931.10 ▼5.85
Add New Post /wp-admin/post-new.php1,514 ▼1917.79 ▼5.03665.56 ▲7.3061.53 ▲6.72
Media Library /wp-admin/upload.php1,382 ▼34.32 ▲0.12101.34 ▼1.5145.90 ▲4.83

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Almost there! Just fix the following items
  • 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/sitebrand-customizer/sitebrand-customizer.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

sitebrand-customizer/sitebrand-customizer.php 92% from 13 tests

The main file in "SiteBrand Customizer" v. 1.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

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
There were no executable files found in this plugin9,898 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JSON4009,690
PHP1913101
CSS10051
Sass11034
TypeScript12019
JavaScript23463

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin