84% cf7-custom-spinner

Code Review | Custom Spinner for Contact Form 7

WordPress plugin Custom Spinner for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: cf7-custom-spinner
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 20, 2018
  • Latest release: Oct 5, 2023
  • Number of updates: 22
  • Update frequency: every 85.6 days
  • Top authors: petersplugins (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /9,644 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.05MB] [CPU: ▲1.96ms] Passed 4 tests

Analyzing server-side resources used by Custom Spinner for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.71 ▲10.27
Dashboard /wp-admin3.41 ▲0.1154.38 ▲4.33
Posts /wp-admin/edit.php3.47 ▲0.1146.02 ▼0.82
Add New Post /wp-admin/post-new.php5.93 ▲0.0592.15 ▼1.59
Media Library /wp-admin/upload.php3.27 ▲0.0536.87 ▲5.91

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Custom Spinner for Contact Form 7: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲12713.27 ▼1.026.02 ▲4.3850.00 ▲10.98
Dashboard /wp-admin2,243 ▲555.85 ▲0.98112.01 ▼1.2139.74 ▼5.30
Posts /wp-admin/edit.php2,127 ▲382.03 ▲0.0639.44 ▼0.3831.86 ▼5.15
Add New Post /wp-admin/post-new.php1,536 ▲1623.04 ▼0.18636.83 ▼15.2851.32 ▲0.86
Media Library /wp-admin/upload.php1,423 ▲324.23 ▲0.0897.53 ▼0.6640.93 ▼1.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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 everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/cf7-custom-spinner/inc/admin/cf7-custom-spinner-admin-page.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: contact form, cf7, spinner, custom form, classicpress...

cf7-custom-spinner/cf7-custom-spinner.php Passed 13 tests

The entry point to "Custom Spinner for Contact Form 7" version 2.0.2 is a PHP file that has certain tags in its header comment area
57 characters long description:
Customize the spinning Loader Animation of Contact Form 7

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,568 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS15990890
PHP13579777648
JavaScript310030

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.62
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods76
▷ Static methods11.32%
▷ Public methods5876.32%
▷ Protected methods22.63%
▷ Private methods1621.05%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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