78% call-to-action-bar

Code Review | Call-To-Action Bar

WordPress plugin Call-To-Action Bar scored78%from 54 tests.

About plugin

  • Plugin page: call-to-action-bar
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 6, 2015
  • Latest release: Aug 3, 2015
  • Number of updates: 7
  • Update frequency: every 4.3 days
  • Top authors: jademind (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /5,050 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.46ms] Passed 4 tests

This is a short check of server-side resources used by Call-To-Action Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.68 ▲5.39
Dashboard /wp-admin3.36 ▲0.0543.93 ▼5.61
Posts /wp-admin/edit.php3.41 ▲0.0547.53 ▲3.30
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.60 ▼5.12
Media Library /wp-admin/upload.php3.28 ▲0.0535.18 ▲1.58
Call-To-Action Bar /wp-admin/options-general.php?page=call-to-action-bar-options3.2630.29

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-comments
ctab_bar_background_color
ctab_able_to_dismiss
ctab_call_to_action_background_color
ctab_bar_text_color
can_compress_scripts
ctab_call_to_action_text_color
widget_recent-posts
theysaidso_admin_options
ctab_general_text
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Call-To-Action Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.69 ▼0.735.22 ▲3.6144.78 ▲4.28
Dashboard /wp-admin2,215 ▲305.88 ▲0.0795.22 ▼4.3035.58 ▼9.09
Posts /wp-admin/edit.php2,104 ▲152.17 ▲0.1238.75 ▲2.1134.90 ▲0.77
Add New Post /wp-admin/post-new.php1,678 ▲15522.38 ▼0.89663.73 ▼19.8169.32 ▲12.26
Media Library /wp-admin/upload.php1,403 ▲154.20 ▼0.0295.50 ▼4.4644.82 ▼3.07
Call-To-Action Bar /wp-admin/options-general.php?page=call-to-action-bar-options1,1011.9532.6938.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/call-to-action-bar/bar-wrapper.php
    • > /wp-content/plugins/call-to-action-bar/bar-template.php
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant CALL_TO_ACTION_BAR__PLUGIN_DIR - assumed 'CALL_TO_ACTION_BAR__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/call-to-action-bar/bar-wrapper.php on line 2
    • > PHP Notice
      Undefined variable: ctab_call_to_action_text in wp-content/plugins/call-to-action-bar/bar-template.php on line 13
    • > PHP Notice
      Undefined variable: ctab_general_text in wp-content/plugins/call-to-action-bar/bar-template.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/call-to-action-bar/options.php:9
    • > PHP Notice
      Undefined variable: ctab_call_to_action_url in wp-content/plugins/call-to-action-bar/bar-template.php on line 12
    • > PHP Notice
      Undefined variable: ctab_bar_text_color in wp-content/plugins/call-to-action-bar/bar-template.php on line 2
    • > PHP Notice
      Undefined variable: ctab_call_to_action_text_color in wp-content/plugins/call-to-action-bar/bar-template.php on line 12
    • > PHP Notice
      Undefined variable: ctab_call_to_action_background_color in wp-content/plugins/call-to-action-bar/bar-template.php on line 12
    • > PHP Warning
      include(): Failed opening 'CALL_TO_ACTION_BAR__PLUGIN_DIRbar-template.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/call-to-action-bar/bar-wrapper.php on line 2
    • > PHP Notice
      Undefined variable: ctab_bar_background_color in wp-content/plugins/call-to-action-bar/bar-template.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
3 plugin tags: top bar, sticky bar, call-to-action

call-to-action-bar/call-to-action-bar.php 92% from 13 tests

Analyzing the main PHP file in "Call-To-Action Bar" version 1.0.1
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 260 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin580 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS33818262
PHP54429243
JavaScript3233275

PHP code Passed 2 tests

Analyzing 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.06
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
static/css/jquery.minicolors.png75.64KB34.31KB▼ 54.64%