89% topbar-call-to-action

Code Review | TopBar Call To Action

WordPress plugin TopBar Call To Action scored89%from 54 tests.

About plugin

  • Plugin page: topbar-call-to-ac...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 7, 2019
  • Latest release: Apr 12, 2023
  • Number of updates: 17
  • Update frequency: every 73.6 days
  • Top authors: sharkthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /42,104 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.51ms] Passed 4 tests

Analyzing server-side resources used by TopBar Call To Action
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.41 ▼9.03
Dashboard /wp-admin3.38 ▲0.0845.30 ▼5.09
Posts /wp-admin/edit.php3.49 ▲0.1448.20 ▲3.10
Add New Post /wp-admin/post-new.php5.96 ▲0.0882.62 ▼7.02
Media Library /wp-admin/upload.php3.30 ▲0.0837.93 ▲4.42

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for TopBar Call To Action
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.63 ▼0.669.75 ▲8.1043.23 ▼0.82
Dashboard /wp-admin2,225 ▲374.86 ▼0.0197.54 ▼23.5340.81 ▼4.30
Posts /wp-admin/edit.php2,105 ▲132.00 ▼0.0239.22 ▼0.4633.69 ▼0.06
Add New Post /wp-admin/post-new.php1,532 ▲13523.15 ▲5.24667.84 ▲52.4951.90 ▼2.36
Media Library /wp-admin/upload.php1,404 ▲194.24 ▼0.0098.51 ▼7.0941.77 ▼3.71

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: upsell, topbar call to action, notification bar, notification, topbar...

topbar-call-to-action/st-topbar-cta.php 77% from 13 tests

Analyzing the main PHP file in "TopBar Call To Action" version 1.1.4
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("topbar-call-to-action.php" instead of "st-topbar-cta.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 361 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin713 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP5134162424
CSS43419185
JavaScript63025104

PHP code Passed 2 tests

A short review 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.17
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/uploads/banner.png191.97KB62.92KB▼ 67.22%