78% wp-branding

Code Review | WP Branding

WordPress plugin WP Branding scored78%from 54 tests.

About plugin

  • Plugin page: wp-branding
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2013
  • Latest release: Apr 1, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: elsteno (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.49ms] Passed 4 tests

Analyzing server-side resources used by WP Branding
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.74 ▲0.24
Dashboard /wp-admin3.33 ▼0.0147.21 ▼14.18
Posts /wp-admin/edit.php3.44 ▲0.0947.13 ▼2.47
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.42 ▼17.54
Media Library /wp-admin/upload.php3.25 ▲0.0235.99 ▲4.83
WP Branding /wp-admin/options-general.php?page=wpbrandingMainOptions3.2228.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Branding
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.28 ▼1.101.73 ▼0.0643.99 ▲0.79
Dashboard /wp-admin2,232 ▲445.88 ▲0.00101.88 ▼16.9240.66 ▼2.87
Posts /wp-admin/edit.php2,096 ▲42.29 ▲0.2849.38 ▲13.4637.58 ▲2.57
Add New Post /wp-admin/post-new.php1,522 ▼618.54 ▲0.14643.16 ▲8.5435.28 ▼21.80
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0096.14 ▲0.9140.20 ▼3.85
WP Branding /wp-admin/options-general.php?page=wpbrandingMainOptions8621.8737.2624.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wpbrandingMainOptions
    • > Notice in wp-content/plugins/wp-branding/wpbranding-options.php+2
    Undefined variable: options_page

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
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-branding/wpbranding-options.php:8
    • > PHP Notice
      Undefined variable: options_page in wp-content/plugins/wp-branding/wpbranding-options.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-branding/branding.php on line 20
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/wp-branding/branding.php on line 20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-branding/branding.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: branding, login, brand, custom logo, custom login

wp-branding/branding.php 92% from 13 tests

The main PHP script in "WP Branding" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-branding.php" instead of "branding.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
Success! There were no dangerous files found in this plugin159 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28033136
JavaScript14323

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
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 classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin