84% brandnestor

Code Review | BrandNestor

WordPress plugin BrandNestor scored84%from 54 tests.

About plugin

  • Plugin page: brandnestor
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2021
  • Latest release: Jul 10, 2023
  • Number of updates: 56
  • Update frequency: every 11.2 days
  • Top authors: webnestors (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /2,484 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.17MB] [CPU: ▲2.08ms] Passed 4 tests

Analyzing server-side resources used by BrandNestor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1543.96 ▲2.51
Dashboard /wp-admin3.50 ▲0.1956.00 ▲1.66
Posts /wp-admin/edit.php3.55 ▲0.1950.25 ▲2.79
Add New Post /wp-admin/post-new.php6.09 ▲0.20101.70 ▲10.20
Media Library /wp-admin/upload.php3.36 ▲0.1336.59 ▲1.37
Export Settings /wp-admin/admin.php?page=brandnestor_export3.1825.03
Import Settings /wp-admin/admin.php?page=brandnestor_import3.3734.33
BrandNestor Templates /wp-admin/edit.php?post_type=brandnestor_template3.4042.21
Settings /wp-admin/admin.php?page=brandnestor3.6754.98

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

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

Browser metrics Passed 4 tests

Checking browser requirements for BrandNestor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲7114.47 ▲0.202.23 ▲0.2642.74 ▼5.62
Dashboard /wp-admin2,257 ▲865.59 ▼0.0798.82 ▼4.8540.57 ▼5.36
Posts /wp-admin/edit.php2,162 ▲592.02 ▼0.0035.88 ▼15.5729.71 ▼19.50
Add New Post /wp-admin/post-new.php6,394 ▲4,85727.69 ▲9.48873.33 ▲217.6265.41 ▼4.16
Media Library /wp-admin/upload.php1,462 ▲594.19 ▲0.0197.69 ▼9.5444.07 ▼3.59
Export Settings /wp-admin/admin.php?page=brandnestor_export110.420.000.00
Import Settings /wp-admin/admin.php?page=brandnestor_import8671.6826.0729.86
BrandNestor Templates /wp-admin/edit.php?post_type=brandnestor_template1,1261.9631.9928.94
Settings /wp-admin/admin.php?page=brandnestor3,4325.4096.2993.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 23× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Brandnestor\\Admin\\Settings\\SettingsField' not found in wp-content/plugins/brandnestor/src/Admin/Settings/SettingsCheckboxesField.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Brandnestor\\Widgets\\Base_Form' not found in wp-content/plugins/brandnestor/src/Widgets/Login.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Brandnestor\\Admin\\Settings\\SettingsField' not found in wp-content/plugins/brandnestor/src/Admin/Settings/SettingsCodeEditorField.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/brandnestor/includes/pro-page.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/brandnestor/includes/register-form.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/brandnestor/src/Widgets/Base_Form.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Brandnestor\\Admin\\Settings\\SettingsTextField' not found in wp-content/plugins/brandnestor/src/Admin/Settings/SettingsImageField.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Brandnestor\\Utilities\\BaseController' not found in wp-content/plugins/brandnestor/src/Front/Front.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/brandnestor/includes/settings-import-page.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Brandnestor\\Admin\\Settings\\SettingsField' not found in wp-content/plugins/brandnestor/src/Admin/Settings/SettingsTextField.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: whitelabel, elementor, branding, white label, custom login...

brandnestor/brandnestor.php Passed 13 tests

The main file in "BrandNestor" v. 2.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
Customize the WordPress dashboard, login/register pages, and more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin43,341 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
JSON40037,053
PHP529772,1744,182
JavaScript1512230854
CSS61319618
PO File1199257577
Markdown131049
SVG2008

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.39
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces9
Interfaces0
Traits1
Classes37
▷ Abstract classes38.11%
▷ Concrete classes3491.89%
▷ Final classes411.76%
Methods255
▷ Static methods3814.90%
▷ Public methods21785.10%
▷ Protected methods187.06%
▷ Private methods207.84%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/logo_150.png13.84KB5.08KB▼ 63.29%
assets/image/logo_full.png34.51KB19.03KB▼ 44.85%