78% brand-center-connector

Code Review | BrandCenter Connector plugin

WordPress plugin BrandCenter Connector plugin scored78%from 54 tests.

About plugin

  • Plugin page: brand-center-conn...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 1, 2018
  • Latest release: Aug 1, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: apps9brandwizard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /578 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by BrandCenter Connector plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.74 ▼8.07
Dashboard /wp-admin3.43 ▲0.1356.08 ▲2.30
Posts /wp-admin/edit.php3.55 ▲0.1953.46 ▲0.47
Add New Post /wp-admin/post-new.php6.03 ▲0.1597.02 ▼6.92
Media Library /wp-admin/upload.php3.35 ▲0.1342.88 ▲6.24
Library /wp-admin/admin.php?page=brand_library3.3333.87
Settings /wp-admin/admin.php?page=brand_settings3.3333.67

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
brandcenter_error_auth
widget_theysaidso_widget
db_upgraded
widget_recent-posts
brandcenter_url
can_compress_scripts
authData
brandcenter_user
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for BrandCenter Connector plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.28 ▲0.122.10 ▲0.4344.27 ▲1.59
Dashboard /wp-admin2,218 ▲385.52 ▼0.1589.26 ▼9.3273.71 ▲29.49
Posts /wp-admin/edit.php2,129 ▲322.03 ▲0.0737.42 ▲0.7334.54 ▼3.71
Add New Post /wp-admin/post-new.php1,702 ▲17422.30 ▼0.74702.63 ▲8.7951.08 ▼9.92
Media Library /wp-admin/upload.php1,423 ▲204.22 ▲0.08104.33 ▼4.5479.85 ▲33.44
Library /wp-admin/admin.php?page=brand_library1,0642.1327.9158.96
Settings /wp-admin/admin.php?page=brand_settings8911.9925.0931.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brand_settings
    • > Notice in wp-content/plugins/brand-center-connector/includes/brandcenter-settings.php+59
    Undefined variable: mark
    • > GET request to /wp-admin/admin.php?page=brand_settings
    • > Notice in wp-content/plugins/brand-center-connector/includes/brandcenter-settings.php+80
    Undefined variable: error_code

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brand_settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/brand-center-connector/js/custom-scripts.js?ver=6.3.1 2:0 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: assets, brandcenter assets

brand-center-connector/wp-brand-center-connector.php 92% from 13 tests

The main file in "BrandCenter Connector plugin" v. 1.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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("brand-center-connector.php" instead of "wp-brand-center-connector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,709 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP492118805
CSS23923460
JavaScript25737444

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
35 compressed PNG files occupy 0.12MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/indd.png3.42KB3.45KB0.00%
images/icons/docx.png4.01KB4.06KB0.00%
images/icons/raw.png3.26KB1.23KB▼ 62.18%
images/icons/mov.png3.75KB3.78KB0.00%
images/icons/flv.png3.39KB3.42KB0.00%