84% simple-call-button-click-to-call-now-button

Code Review | Simple Call Button - Click to Call Now Button

WordPress plugin Simple Call Button - Click to Call Now Button scored84%from 54 tests.

About plugin

  • Plugin page: simple-call-butto...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2.4
  • WordPress version: 6.3.1
  • First release: Dec 6, 2019
  • Latest release: Dec 6, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: getseofix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,786 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: ▼7.29ms] Passed 4 tests

An overview of server-side resources used by Simple Call Button - Click to Call Now Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.69 ▼0.42
Dashboard /wp-admin3.35 ▲0.0546.47 ▼3.03
Posts /wp-admin/edit.php3.40 ▲0.0546.76 ▼8.42
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.08 ▼17.28
Media Library /wp-admin/upload.php3.27 ▲0.0543.31 ▲6.03

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_call_button
widget_recent-comments
Call_buttonInputField1
Call_buttonInputField2
Call_buttonInputField4
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Call Button - Click to Call Now Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.23 ▼1.141.75 ▲0.1042.66 ▲0.15
Dashboard /wp-admin2,224 ▲335.87 ▲1.0397.72 ▼4.6482.36 ▲38.99
Posts /wp-admin/edit.php2,107 ▲182.01 ▲0.0135.05 ▼6.2432.23 ▼2.22
Add New Post /wp-admin/post-new.php1,680 ▲13822.30 ▲4.10693.65 ▲35.0666.70 ▼0.52
Media Library /wp-admin/upload.php1,400 ▲154.24 ▲0.12120.15 ▲5.2244.44 ▼4.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • Call_buttonInputField2
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • Call_buttonInputField4
    • db_upgraded
    • widget_call_button
    • widget_recent-posts
    • Call_buttonInputField3
    • theysaidso_admin_options
    • ...

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-call-button-click-to-call-now-button/CustomCode.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/simple-call-button-click-to-call-now-button/Settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: click to call, call button, call now, phone button

simple-call-button-click-to-call-now-button/CallButton-GSF.php 92% from 13 tests

"Simple Call Button - Click to Call Now Button" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-call-button-click-to-call-now-button.php" instead of "CallButton-GSF.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin253 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36642253

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.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 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.68MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenicon.png0.32KB0.11KB▼ 65.66%
promo.png30.41KB9.60KB▼ 68.43%
phone.png6.88KB0.50KB▼ 92.72%
screenshot-1.png439.06KB136.83KB▼ 68.84%
screenshot-3.png123.98KB38.42KB▼ 69.01%