78% branding

Code Review | Branding

WordPress plugin Branding scored78%from 54 tests.

About plugin

  • Plugin page: branding
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 27, 2017
  • Latest release: Feb 27, 2017
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: lolitaframework (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,069 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼14.65ms] Passed 4 tests

A check of server-side resources used by Branding
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6149.14 ▲8.65
Dashboard /wp-admin3.86 ▲0.5554.54 ▲3.33
Posts /wp-admin/edit.php3.88 ▲0.5352.09 ▲3.15
Add New Post /wp-admin/post-new.php3.90 ▼1.9939.71 ▼58.38
Media Library /wp-admin/upload.php3.57 ▲0.3430.54 ▼6.68

Server storage [IO: ▲55.01MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Total filesystem usage should be limited to 25MB (currently using 55.01MB)
Filesystem: 230 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Branding
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,046 ▲27513.81 ▼0.1412.82 ▲10.9643.04 ▲3.26
Dashboard /wp-admin2,235 ▲545.65 ▼0.0283.67 ▼19.7439.96 ▼3.36
Posts /wp-admin/edit.php2,137 ▲401.98 ▼0.0536.52 ▼3.0233.07 ▲1.22
Add New Post /wp-admin/post-new.php1,574 ▲4818.23 ▼4.79636.78 ▼74.5968.43 ▲10.96
Media Library /wp-admin/upload.php1,440 ▲374.06 ▼0.1695.66 ▼4.8742.52 ▼4.36

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 does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 20× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_3.php
    • > /wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_6.php
    • > /wp-content/plugins/branding/app/views/blocks/wp_login_default_desc.php
    • > /wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_5.php
    • > /wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_1.php
    • > /wp-content/plugins/branding/LolitaFramework/Configuration/views/meta_box_with_controls.php
    • > /wp-content/plugins/branding/LolitaFramework/Configuration/views/meta_box_default.php
    • > /wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_2.php
    • > /wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_4.php
    • > /wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader.php
  • 143× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function getOptions() on null in wp-content/plugins/branding/LolitaFramework/Controls/Checkboxes/views/checkboxes.php:1
    • > PHP Notice
      Undefined variable: me in wp-content/plugins/branding/LolitaFramework/Controls/Select/views/select.php on line 1
    • > PHP Notice
      Undefined variable: color in wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_10.php on line 38
    • > PHP Notice
      Undefined variable: bg in wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_11.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function getName() on null in wp-content/plugins/branding/LolitaFramework/Configuration/views/taxonomy_row.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'branding\\LolitaFramework\\Configuration\\IModule' not found in wp-content/plugins/branding/LolitaFramework/Configuration/Modules/Customs.php:8
    • > PHP Notice
      Undefined variable: bg in wp-content/plugins/branding/LolitaFramework/CssLoader/views/lf_css_loader_4.php on line 8
    • > PHP Notice
      Undefined variable: input_background_color in wp-content/plugins/branding/app/views/styles/styles.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to a member function getAttributesString() on null in wp-content/plugins/branding/LolitaFramework/Controls/Button/views/button.php:1
    • > PHP Notice
      Undefined variable: controls in wp-content/plugins/branding/LolitaFramework/Configuration/views/taxonomy_controls.php on line 1

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

branding/branding.php 92% from 13 tests

Analyzing the main PHP file in "Branding" version 1.0
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 286 characters long)

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 detected13,993 lines of code in 184 files:
LanguageFilesBlank linesComment linesLines of code
PHP1221,0974,3327,583
TypeScript134682,8921,570
Sass68411,383
JavaScript111529991,209
JSON1600935
CSS929689
SVG201503
Markdown233080
PO File26834
XML1117

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.38
Average class complexity9.11
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces22
Interfaces3
Traits0
Classes73
▷ Abstract classes34.11%
▷ Concrete classes7095.89%
▷ Final classes00.00%
Methods520
▷ Static methods25749.42%
▷ Public methods46589.42%
▷ Protected methods122.31%
▷ Private methods438.27%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants28
▷ Global constants1242.86%
▷ Class constants1657.14%
▷ Public constants16100.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
6 PNG files occupy 0.20MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
LolitaFramework/Controls/Repeater/assets/images/sprite.png17.94KB0.93KB▼ 94.83%
promo/banner-772x250.png43.46KB15.46KB▼ 64.43%
promo/icon-128x128.png6.36KB3.50KB▼ 44.88%
promo/icon-256x256.png14.06KB6.50KB▼ 53.76%
promo/icon-80x80.png3.72KB2.18KB▼ 41.43%