84% pb-addons

Code Review | PB Addons

WordPress plugin PB Addons scored84%from 54 tests.

About plugin

  • Plugin page: pb-addons
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2023
  • Latest release: Jan 23, 2023
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: muhammadasadmushtaq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /641 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.27MB] [CPU: ▼3.66ms] Passed 4 tests

A check of server-side resources used by PB Addons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2542.28 ▼2.54
Dashboard /wp-admin3.58 ▲0.2854.80 ▲2.84
Posts /wp-admin/edit.php3.69 ▲0.3455.56 ▲1.32
Add New Post /wp-admin/post-new.php6.16 ▲0.2788.12 ▼15.86
Media Library /wp-admin/upload.php3.50 ▲0.2743.03 ▲2.44
Builders /wp-admin/admin.php?page=premiumblog3.4736.03
Widgets /wp-admin/admin.php?page=pbw-widgets3.4746.83
Tools /wp-admin/admin.php?page=pbw-tools3.4738.18

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 80 new files
Database: no new tables, 17 new options
New WordPress options
premiumblog_widgets_posts_classic
premiumblog_widgets_news_ticker
premiumblog_widgets_posts_slider
premiumblog_widgets_posts_flex_cards
widget_theysaidso_widget
db_upgraded
premiumblog_widgets_posts_grid
premiumblog_widgets_author_box
premiumblog_widgets_mailchimp_form
theysaidso_admin_options
...

Browser metrics Passed 4 tests

PB Addons: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲19713.52 ▼0.839.41 ▲6.9440.87 ▼4.95
Dashboard /wp-admin2,240 ▲665.57 ▼0.0189.79 ▼10.4938.23 ▼5.28
Posts /wp-admin/edit.php2,145 ▲482.02 ▲0.0742.00 ▲6.8938.67 ▲2.22
Add New Post /wp-admin/post-new.php1,561 ▲3523.06 ▲0.02672.39 ▼3.8455.51 ▲2.18
Media Library /wp-admin/upload.php1,445 ▲484.26 ▲0.0899.21 ▼2.6245.13 ▼1.04
Builders /wp-admin/admin.php?page=premiumblog9162.0228.71119.33
Widgets /wp-admin/admin.php?page=pbw-widgets9992.0125.5156.73
Tools /wp-admin/admin.php?page=pbw-tools9282.0124.6053.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 17 options
    • db_upgraded
    • premiumblog_widgets_posts_list
    • widget_recent-comments
    • premiumblog_widgets_posts_grid
    • premiumblog_builders_elementor
    • widget_theysaidso_widget
    • premiumblog_widgets_category_tiles
    • premiumblog_widgets_posts_slider
    • theysaidso_admin_options
    • premiumblog_widgets_posts_classic
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following
  • 73× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-2.php:49
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-1.php on line 33
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-1.php on line 36
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/pb-addons/templates/Category_Tiles/default.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-3.php on line 43
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-2.php on line 29
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-3.php on line 32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-1.php on line 30
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/pb-addons/widgets/elementor/includes/author_box/layout-2.php on line 11
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/pb-addons/templates/Category_Tiles/layout-2.php on line 45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: elementor, gutenberg, premiumblog, blog, blog widgets

pb-addons/pb-addons.php 85% from 13 tests

The main PHP script in "PB Addons" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 246 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected17,017 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP267111,4958,424
CSS254592046,494
JavaScript54979652,061
SVG126038

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.38
▷ Minimum class complexity4.00
▷ Maximum class complexity56.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods114
▷ Static methods1815.79%
▷ Public methods9381.58%
▷ Protected methods2017.54%
▷ Private methods10.88%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
16 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/admin_icons/carousel.png22.33KB8.02KB▼ 64.08%
assets/img/thumb-carousel.png4.33KB1.56KB▼ 63.96%
assets/img/thumb-medium.png7.95KB3.59KB▼ 54.78%
assets/img/thumb-square-small.png3.75KB1.56KB▼ 58.31%
assets/img/admin_icons/grid.png3.60KB1.76KB▼ 51.17%