73% brozzme-fullwidth-divi

Code Review | Brozzme Fullwidth and Automatic Layout in Divi

WordPress plugin Brozzme Fullwidth and Automatic Layout in Divi scored73%from 54 tests.

About plugin

  • Plugin page: brozzme-fullwidth...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Oct 29, 2021
  • Number of updates: 34
  • Update frequency: every 48.4 days
  • Top authors: Benoti (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /4,036 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.04ms] 75% from 4 tests

This is a short check of server-side resources used by Brozzme Fullwidth and Automatic Layout in Divi
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 795.58ms on /wp-admin/admin.php?page=brozzme-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1244.97 ▲0.36
Dashboard /wp-admin3.48 ▲0.1850.31 ▼10.27
Posts /wp-admin/edit.php3.60 ▲0.2453.60 ▲2.06
Add New Post /wp-admin/post-new.php6.06 ▲0.18116.93 ▲1.88
Media Library /wp-admin/upload.php3.41 ▲0.1837.45 ▼0.11
Fullwidth Divi /wp-admin/admin.php?page=brozzme-fullwidth-divi3.3735.94
Brozzme /wp-admin/admin.php?page=brozzme-plugins3.53795.58

Server storage [IO: ▲0.12MB] [DB: ▲0.02MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Brozzme Fullwidth and Automatic Layout in Divi: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.42 ▲0.031.89 ▼0.2748.22 ▲4.06
Dashboard /wp-admin2,232 ▲444.91 ▲0.04103.40 ▼4.1539.58 ▼1.71
Posts /wp-admin/edit.php2,109 ▲201.98 ▲0.0040.09 ▲0.3033.76 ▼3.87
Add New Post /wp-admin/post-new.php1,538 ▲2423.23 ▲5.70663.64 ▼30.6157.79 ▼2.80
Media Library /wp-admin/upload.php1,411 ▲234.22 ▲0.1095.90 ▼21.8853.01 ▲5.49
Fullwidth Divi /wp-admin/admin.php?page=brozzme-fullwidth-divi9152.0826.6330.94
Brozzme /wp-admin/admin.php?page=brozzme-plugins1,1222.0224.1447.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method brozzme_fullwidth_divi::uninstall() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brozzme-fullwidth-divi/includes/brozzme_fullwidth_divi_core.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brozzme-fullwidth-divi/includes/brozzme_fullwidth_divi_settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/brozzme-fullwidth-divi/brozzme_fullwidth_divi.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

brozzme-fullwidth-divi/brozzme_fullwidth_divi.php 85% from 13 tests

The primary PHP file in "Brozzme Fullwidth and Automatic Layout in Divi" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("brozzme-fullwidth-divi.php" instead of "brozzme_fullwidth_divi.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,119 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4170156737
CSS1245226
PO File14860156

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.50
▷ Minimum class complexity17.00
▷ Maximum class complexity34.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods51
▷ Static methods47.84%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/img/logo-wps-200x200px.png30.17KB7.41KB▼ 75.43%