84% atp-call-now

Code Review | ATP Call Now

WordPress plugin ATP Call Now scored84%from 54 tests.

About plugin

  • Plugin page: atp-call-now
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2018
  • Latest release: Mar 11, 2020
  • Number of updates: 7
  • Update frequency: every 75.0 days
  • Top authors: truongthanh6365 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /3,689 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.06ms] Passed 4 tests

This is a short check of server-side resources used by ATP Call Now
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.50 ▲2.84
Dashboard /wp-admin3.35 ▲0.0467.61 ▲15.36
Posts /wp-admin/edit.php3.46 ▲0.1056.81 ▼0.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.28 ▼11.41
Media Library /wp-admin/upload.php3.25 ▲0.0243.23 ▲5.31

Server storage [IO: ▲0.03MB] [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: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ATP Call Now
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲21615.01 ▲0.481.78 ▼0.0648.51 ▲3.84
Dashboard /wp-admin2,362 ▲1856.36 ▲0.75120.53 ▲30.7298.98 ▲55.93
Posts /wp-admin/edit.php2,293 ▲1903.50 ▲1.3956.88 ▲14.7779.33 ▲41.90
Add New Post /wp-admin/post-new.php1,709 ▲18122.61 ▼0.45628.62 ▲5.0635.18 ▼25.86
Media Library /wp-admin/upload.php1,430 ▲334.26 ▲0.0485.00 ▼17.5690.22 ▲44.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atp-call-now/ATP-Call-Now.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: sell, conversions, hotline, customers, sales...

atp-call-now/ATP-Call-Now.php 85% from 13 tests

Analyzing the main PHP file in "ATP Call Now" version 1.0.3
You should first fix the following items:
  • 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: The principal plugin file should be the same as the plugin slug ("atp-call-now.php" instead of "ATP-Call-Now.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
Good job! No executable or dangerous file extensions detected385 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2712204
CSS1102097
PO File1242663
JavaScript10121

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/telephone.png2.63KB2.77KB0.00%
img/telephone-20x20.png0.41KB0.62KB0.00%
img/shopping-cart.png2.45KB2.65KB0.00%
img/form.png1.99KB1.72KB▼ 13.50%