93% lucep-call-now-button

Code Review | Lucep Call Now Button

WordPress plugin Lucep Call Now Button scored 93% from 54 tests.

About plugin

  • Plugin page: lucep-call-now-bu...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.8.1
  • WordPress version: 5.8.1
  • First release: Jul 24, 2017
  • Latest release: Aug 4, 2017
  • Number of updates: 6
  • Update frequency: every 2.0 days
  • Top authors: lucep (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 719 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼142.48ms] Passed 4 tests

Analyzing server-side resources used by Lucep Call Now Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1439.93 ▲18.66
Dashboard /wp-admin3.09 ▲0.0348.32 ▲2.52
Posts /wp-admin/edit.php3.14 ▲0.0346.41 ▲0.90
Add New Post /wp-admin/post-new.php5.44 ▲0.0196.02 ▼570.55
Media Library /wp-admin/upload.php3.03 ▲0.0333.54 ▼2.79

Server storage [IO: ▲0.05MB] [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: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Lucep Call Now Button: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,732 ▲13615.85 ▲0.437.96 ▲0.1249.23 ▲1.61
Dashboard /wp-admin2,989 ▲555.85 ▼0.05140.07 ▼5.57133.80 ▲17.43
Posts /wp-admin/edit.php2,785 ▲462.71 ▲0.0168.50 ▼3.9599.20 ▲1.49
Add New Post /wp-admin/post-new.php1,519 ▼8518.63 ▼0.20384.17 ▼7.33115.50 ▼1.43
Media Library /wp-admin/upload.php1,777 ▼334.98 ▼0.05134.03 ▼17.56156.21 ▲25.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lucep-call-now-button/lucep.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

lucep-call-now-button/lucep.php 77% from 13 tests

The primary PHP file in "Lucep Call Now Button" version 1.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 248 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lucep-call-now-button.php" instead of "lucep.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin217 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1924184
CSS12233

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/lucep_icon.png0.47KB0.44KB▼ 5.99%