78% broadcast-call-to-actions

Code Review | Broadcast - WordPress Call to Actions

WordPress plugin Broadcast - WordPress Call to Actions scored 78% from 54 tests.

About plugin

  • Plugin page: broadcast-call-to...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 23, 2017
  • Latest release: Apr 7, 2017
  • Number of updates: 9
  • Update frequency: every 1.8 days
  • Top authors: dcooney (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.17ms] Passed 4 tests

Analyzing server-side resources used by Broadcast - WordPress Call to Actions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.69 ▼3.48
Dashboard /wp-admin3.38 ▲0.0845.75 ▼2.13
Posts /wp-admin/edit.php3.49 ▲0.1444.62 ▼1.41
Add New Post /wp-admin/post-new.php5.96 ▲0.0886.06 ▼9.66
Media Library /wp-admin/upload.php3.30 ▲0.0735.44 ▼0.96
Help /wp-admin/edit.php?post_type=broadcast&page=help3.3232.12
Add New /wp-admin/post-new.php?post_type=broadcast3.4146.39
Call to Actions /wp-admin/edit.php?post_type=broadcast3.3436.31
Dashboard /wp-admin/edit.php?post_type=broadcast&page=dashboard3.3333.25
Layouts /wp-admin/edit.php?post_type=broadcast&page=layouts3.3430.74

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 100 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Broadcast - WordPress Call to Actions
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲7713.27 ▼1.124.15 ▲2.1641.43 ▲0.76
Dashboard /wp-admin2,252 ▲674.87 ▼0.94107.00 ▲9.6736.03 ▼7.67
Posts /wp-admin/edit.php2,135 ▲462.04 ▼0.0541.39 ▲0.7331.71 ▼3.70
Add New Post /wp-admin/post-new.php1,563 ▲2823.28 ▼0.09633.07 ▼25.7753.25 ▼1.14
Media Library /wp-admin/upload.php1,428 ▲434.19 ▼0.0192.64 ▼12.2539.34 ▼4.89
Help /wp-admin/edit.php?post_type=broadcast&page=help1,1121.9225.5663.94
Add New /wp-admin/post-new.php?post_type=broadcast2,2837.73168.0083.23
Call to Actions /wp-admin/edit.php?post_type=broadcast1,1461.9432.3535.28
Dashboard /wp-admin/edit.php?post_type=broadcast&page=dashboard1,3232.2037.1554.77
Layouts /wp-admin/edit.php?post_type=broadcast&page=layouts1,2482.2835.2137.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/broadcast-call-to-actions/admin/includes/layout-list-template.php
  • 24× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/broadcast-call-to-actions/admin/includes/cta/about.php:2
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/broadcast-call-to-actions/admin/includes/layout-list-template.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/broadcast-call-to-actions/admin/includes/layout-list-template.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/broadcast-call-to-actions/admin/includes/cta/plugins.php:2
    • > PHP Warning
      Use of undefined constant BROADCAST_TITLE - assumed 'BROADCAST_TITLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/broadcast-call-to-actions/admin/views/addons.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function includes_url() in wp-content/plugins/broadcast-call-to-actions/admin/editor/editor-build.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/broadcast-call-to-actions/admin/views/addons.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/broadcast-call-to-actions/admin/includes/layout-list-template.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/broadcast-call-to-actions/admin/includes/cta/functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/broadcast-call-to-actions/admin/views/layouts.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: announcement, action, broadcast, callout, cta...

broadcast-call-to-actions/broadcast.php 92% from 13 tests

The principal PHP file in "Broadcast - WordPress Call to Actions" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("broadcast-call-to-actions.php" instead of "broadcast.php")

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 plugin15,528 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript251,1651,1309,891
CSS11162962,471
HTML1222511,693
PHP283673401,473

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.33
▷ Minimum class complexity5.00
▷ Maximum class complexity15.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/bkg-radio_off.png1.33KB0.49KB▼ 63.47%
admin/assets/img/help/broadcast-help-2.png49.43KB51.22KB0.00%
admin/assets/img/bkg-select.png1.06KB0.18KB▼ 83.09%
admin/assets/img/logos/post-explorer-48x48.png2.06KB0.94KB▼ 54.49%
admin/assets/img/bkg-chkbox_selected.png1.26KB0.32KB▼ 74.55%