72% wbcom-designs-buddypress-ads

Code Review | Wbcom Designs - BuddyPress Ads

WordPress plugin Wbcom Designs - BuddyPress Ads scored72%from 54 tests.

About plugin

  • Plugin page: wbcom-designs-bud...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.0
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Aug 17, 2023
  • Number of updates: 11
  • Update frequency: every 58.1 days
  • Top authors: vapvarun (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,094 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.85ms] Passed 4 tests

Server-side resources used by Wbcom Designs - BuddyPress Ads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.24 ▼5.46
Dashboard /wp-admin3.31 ▼0.0445.75 ▼13.32
Posts /wp-admin/edit.php3.36 ▲0.0044.70 ▼6.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.65 ▼17.95
Media Library /wp-admin/upload.php3.23 ▲0.0041.33 ▲1.74
Our Plugins /wp-admin/admin.php?page=wbcom-plugins-page3.0023.42
Support /wp-admin/admin.php?page=wbcom-support-page3.0022.69
Our Themes /wp-admin/admin.php?page=wbcom-themes-page3.0025.97

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wbcom Designs - BuddyPress Ads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.75 ▲0.401.59 ▼0.3740.65 ▲1.88
Dashboard /wp-admin2,192 ▲125.54 ▼0.1081.24 ▼5.4037.30 ▼9.84
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0433.05 ▼1.9833.49 ▼3.64
Add New Post /wp-admin/post-new.php1,537 ▲1118.14 ▼5.62644.70 ▼94.4351.25 ▼15.48
Media Library /wp-admin/upload.php1,391 ▼124.21 ▼0.0497.91 ▼3.4141.71 ▼3.43
Our Plugins /wp-admin/admin.php?page=wbcom-plugins-page280.420.093.55
Support /wp-admin/admin.php?page=wbcom-support-page280.420.083.72
Our Themes /wp-admin/admin.php?page=wbcom-themes-page280.420.103.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wbcom-designs-buddypress-ads/public/partials/buddypress-ads-rotator-public-display.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wbcom-designs-buddypress-ads/admin/wbcom/templates/wbcom-license-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wbcom-designs-buddypress-ads/admin/wbcom/templates/wbcom-plugins-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wbcom-designs-buddypress-ads/admin/wbcom/templates/wbcom-support-page.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wbcom-plugins-page
    • > Network (severe)
    wp-admin/admin.php?page=wbcom-plugins-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=wbcom-support-page
    • > Network (severe)
    wp-admin/admin.php?page=wbcom-support-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=wbcom-themes-page
    • > Network (severe)
    wp-admin/admin.php?page=wbcom-themes-page - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: Please take inspiration from this readme.txt

wbcom-designs-buddypress-ads/buddypress-ads-rotator.php 85% from 13 tests

Analyzing the main PHP file in "Wbcom Designs - BuddyPress Ads" version 1.5.3
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wbcom-designs-buddypress-ads.php" instead of "buddypress-ads-rotator.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin7,761 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JSON2002,792
PHP172349052,596
CSS4310691,960
JavaScript52574413

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity38.38
▷ Minimum class complexity1.00
▷ Maximum class complexity169.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods76
▷ Static methods22.63%
▷ Public methods6990.79%
▷ Protected methods00.00%
▷ Private methods79.21%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/wbcom/assets/imgs/logowbcom.png10.12KB3.87KB▼ 61.72%
admin/wbcom/assets/imgs/wbcom-offer-notice.png67.64KB32.40KB▼ 52.11%
admin/images/output-left.png6.95KB2.75KB▼ 60.48%
admin/images/output-center.png5.96KB2.29KB▼ 61.56%
admin/images/output-right.png7.15KB2.75KB▼ 61.59%