10% wp-cta-top-bar

Code Review | WP CTA Top Bar

WordPress plugin WP CTA Top Bar scored10%from 54 tests.

About plugin

  • Plugin page: wp-cta-top-bar
  • Plugin version: 0.4.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.8
  • WordPress version: 6.3.1
  • First release: Dec 25, 2017
  • Latest release: Aug 9, 2018
  • Number of updates: 18
  • Update frequency: every 12.6 days
  • Top authors: alipiogabriel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,755 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.90MB] [CPU: ▼61.53ms] Passed 4 tests

This is a short check of server-side resources used by WP CTA Top Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.79 ▼39.27
Dashboard /wp-admin2.12 ▼1.226.08 ▼60.62
Posts /wp-admin/edit.php2.12 ▼1.236.22 ▼46.87
Add New Post /wp-admin/post-new.php2.12 ▼3.767.39 ▼99.34
Media Library /wp-admin/upload.php2.12 ▼1.117.42 ▼31.71

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
wpctatb_option
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP CTA Top Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,999 ▲23813.97 ▼0.3310.98 ▲9.2450.58 ▲10.18
Dashboard /wp-admin2,232 ▲525.82 ▲0.1094.01 ▲2.9442.10 ▲1.19
Posts /wp-admin/edit.php2,142 ▲422.30 ▲0.2840.73 ▲0.3535.56 ▼4.50
Add New Post /wp-admin/post-new.php1,555 ▲2923.34 ▲0.19659.26 ▼10.6436.53 ▼21.43
Media Library /wp-admin/upload.php1,431 ▲314.41 ▲0.19111.71 ▲14.3547.25 ▼1.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • wpctatb_option
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Version format is invalid
  • Screenshots: Please describe screenshot #1 in wp-cta-top-bar/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-cta-top-bar/wpctatopbar.php 77% from 13 tests

The principal PHP file in "WP CTA Top Bar" v. 0.4.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-cta-top-bar.php" instead of "wpctatopbar.php")
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/languages/")

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
Everything looks great! No dangerous files found in this plugin484 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP478134335
JavaScript33124116
CSS25033

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin