79% brand-extra

Code Review | Brand Extra

WordPress plugin Brand Extra scored79%from 54 tests.

About plugin

  • Plugin page: brand-extra
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Apr 4, 2018
  • Number of updates: 10
  • Update frequency: every 16.7 days
  • Top authors: maxsdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,588 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲1.53ms] Passed 4 tests

An overview of server-side resources used by Brand Extra
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.38 ▼0.67
Dashboard /wp-admin3.35 ▲0.0548.43 ▲3.45
Posts /wp-admin/edit.php3.47 ▲0.1151.51 ▲0.12
Add New Post /wp-admin/post-new.php5.95 ▲0.07106.71 ▲17.84
Media Library /wp-admin/upload.php3.28 ▲0.0536.38 ▲3.23

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_brand_instagram
can_compress_scripts
widget_brand_social_links
theysaidso_admin_options
widget_theysaidso_widget
widget_brand_flickr

Browser metrics Passed 4 tests

Checking browser requirements for Brand Extra
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.41 ▼0.782.40 ▲0.4843.59 ▼2.38
Dashboard /wp-admin2,220 ▲354.93 ▲0.06112.38 ▲5.2946.28 ▲6.65
Posts /wp-admin/edit.php2,100 ▲82.03 ▲0.0439.87 ▲1.9338.36 ▲2.93
Add New Post /wp-admin/post-new.php1,528 ▲917.47 ▼5.68694.41 ▲46.3655.86 ▲0.05
Media Library /wp-admin/upload.php1,405 ▲174.26 ▲0.05103.54 ▲2.6945.94 ▲3.02

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 did not uninstall successfully, leaving 9 options in the database
    • widget_brand_social_links
    • db_upgraded
    • widget_brand_instagram
    • widget_recent-comments
    • widget_brand_flickr
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/brand-extra/brand-extra.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant BRAND_EXTRA_PATH - assumed 'BRAND_EXTRA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/brand-extra/inc/shortcodes/shortcodes.php on line 3
    • > PHP Warning
      Use of undefined constant BRAND_EXTRA_PATH - assumed 'BRAND_EXTRA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/brand-extra/inc/widgets/widgets.php on line 3
    • > PHP Warning
      require_once(BRAND_EXTRA_PATHinc/shortcodes/brand-gallery-shortcode.php): failed to open stream: No such file or directory in wp-content/plugins/brand-extra/inc/shortcodes/shortcodes.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/brand-extra/inc/widgets/social-links.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Brand_Extra\\Shortcodes\\add_filter() in wp-content/plugins/brand-extra/inc/shortcodes/brand-gallery-shortcode.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/brand-extra/inc/widgets/instagram.php:7
    • > PHP Warning
      require_once(BRAND_EXTRA_PATHinc/widgets/instagram.php): failed to open stream: No such file or directory in wp-content/plugins/brand-extra/inc/widgets/widgets.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'BRAND_EXTRA_PATHinc/widgets/instagram.php' (include_path='.:/usr/share/php') in wp-content/plugins/brand-extra/inc/widgets/widgets.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'BRAND_EXTRA_PATHinc/shortcodes/brand-gallery-shortcode.php' (include_path='.:/usr/share/php') in wp-content/plugins/brand-extra/inc/shortcodes/shortcodes.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/brand-extra/inc/widgets/flickr.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: shortcodes, gallery, widgets

brand-extra/brand-extra.php Passed 13 tests

The principal PHP file in "Brand Extra" v. 1.2 is loaded by WordPress automatically on each request
83 characters long description:
Add widgets, shortcodes, a panel to manage extensions and more to your Brand theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin10,533 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,0234633,597
CSS81581093,272
SVG2002,672
PHP10220416992

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity20.00
▷ Minimum class complexity7.00
▷ Maximum class complexity35.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods49
▷ Static methods816.33%
▷ Public methods4285.71%
▷ Protected methods24.08%
▷ Private methods510.20%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants6
▷ Global constants6100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flickr.png0.19KB0.16KB▼ 19.70%
assets/photoswipe/default-skin/default-skin.png0.53KB0.72KB0.00%