78% debranding

Code Review | de:branding

WordPress plugin de:branding scored78%from 54 tests.

About plugin

  • Plugin page: debranding
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Jun 10, 2016
  • Latest release: Jun 17, 2016
  • Number of updates: 7
  • Update frequency: every 14.6 days
  • Top authors: decollete (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,055 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.08MB] [CPU: ▼18.50ms] Passed 4 tests

Server-side resources used by de:branding
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.59 ▼3.28
Dashboard /wp-admin3.39 ▲0.0555.30 ▼7.95
Posts /wp-admin/edit.php3.44 ▲0.0851.28 ▲0.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0985.71 ▼62.88
Media Library /wp-admin/upload.php3.31 ▲0.0845.09 ▲7.77
de:branding /wp-admin/themes.php?page=debranding3.3933.58

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

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

Browser metrics Passed 4 tests

de:branding: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6714.36 ▼0.231.92 ▲0.2343.96 ▲2.42
Dashboard /wp-admin2,222 ▲455.64 ▼0.0196.67 ▲5.8043.39 ▲2.95
Posts /wp-admin/edit.php2,107 ▲72.00 ▲0.0635.25 ▼6.8333.03 ▼4.48
Add New Post /wp-admin/post-new.php1,529 ▲322.99 ▼0.37671.38 ▲60.2553.74 ▼2.65
Media Library /wp-admin/upload.php1,404 ▲74.23 ▲0.07110.98 ▲7.0840.45 ▼3.17
de:branding /wp-admin/themes.php?page=debranding1,7323.4565.9592.51

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 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • debrand_configured

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/themes.php?page=debranding
    • > Notice in wp-content/plugins/debranding/classes/class-debrand-activation.php+85
    Undefined index: nomin

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/debranding/debranding.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/debranding/debranding.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: site skin advertising, debranding

debranding/debranding.php Passed 13 tests

"de:branding" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
42 characters long description:
WordPress plugin for site skin advertising

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,825 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
Sass712031697
PHP412416561
PO File2171220350
JavaScript3189149
SVG30250
JSON10017
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity25.67
▷ Minimum class complexity7.00
▷ Maximum class complexity39.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 1.17MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png650.37KB115.33KB▼ 82.27%
assets/img/menu_logo.png0.68KB0.35KB▼ 47.91%
assets/img/deadblocker.png0.45KB0.27KB▼ 39.66%
assets/img/decomments.png0.45KB0.27KB▼ 39.61%
assets/img/mistape.png0.51KB0.49KB▼ 2.69%