10% call-to-action-widget

Code Review | Call to Action Widget

WordPress plugin Call to Action Widget scored10%from 54 tests.

About plugin

  • Plugin page: call-to-action-wi...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 17, 2013
  • Latest release: Dec 10, 2013
  • Number of updates: 31
  • Update frequency: every 6.8 days
  • Top authors: charlie.strickler@gmail.com (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /13,102 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
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/call-to-action-widget/cta-widget.php+93
    Function create_function() is deprecated

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

This is a short check of server-side resources used by Call to Action Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.385.22 ▼36.42
Dashboard /wp-admin2.11 ▼1.206.88 ▼45.31
Posts /wp-admin/edit.php2.11 ▼1.257.32 ▼43.24
Add New Post /wp-admin/post-new.php2.11 ▼3.785.78 ▼85.54
Media Library /wp-admin/upload.php2.11 ▼1.125.90 ▼31.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_ctatext

Browser metrics Passed 4 tests

Checking browser requirements for Call to Action Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.53 ▼0.734.41 ▲2.3545.08 ▼0.31
Dashboard /wp-admin2,203 ▲145.80 ▲0.89103.53 ▼24.6538.21 ▼6.49
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0134.46 ▼4.0235.15 ▲1.98
Add New Post /wp-admin/post-new.php1,533 ▼023.33 ▲0.19672.47 ▼11.0957.79 ▼7.63
Media Library /wp-admin/upload.php1,388 ▼04.25 ▼0.04104.83 ▼5.7245.78 ▼3.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/call-to-action-widget/cta-widget.php+93
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_ctatext
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/call-to-action-widget/cta-widget.php:13

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: The official readme.txt might help

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

"Call to Action Widget" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("call-to-action-widget.php" instead of "cta-widget.php")

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
Good job! No executable or dangerous file extensions detected68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1161268

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin